In a statement published by the Iranian state news agency Irna, Masoud Pezeshkian says that Iran believes in diplomatic solutions, but "will never give in to pressure, sanctions, and bullying".
He says that Iran has the right to respond to attackers, in accordance with national norms.
The statement comes after a day of intense diplomatic activity from several quarters. Among other things, German Chancellor Olaf Scholz has spoken by phone with Iran's President Masoud Pezeshkian, and US President Joe Biden has led a joint call from several Western countries to Iran not to attack Israel.
"We have urged Iran to refrain from threats of a military attack on Israel and discussed the serious consequences for regional security if such an attack occurs", reads a statement after the leaders spoke by phone with each other on Monday.
Iran has promised to punish Israel "hard" for the deadly attacks on high-ranking leaders within the organizations Hamas and Hezbollah, both of which have close ties to Iran.
A possible Iranian retaliatory action may be days away, according to Israeli intelligence. The White House is on the same line and says that an Iranian attack could come at any time this week.