Iranian President Masoud Pezeshkian said on Monday that Tehran would never give up on its missile program as it needs such deterrence for its security in a region where Iran's arch-foe Israel is able to "drop missiles on Gaza every day".
Iran has for years defied Western calls to limit its missile program.
The United States and its allies have more recently accused Iran of transferring ballistic missiles to Russia for its war in Ukraine, imposing fresh sanctions on Moscow and Tehran.
Both countries have denied the claims.
"If we don’t have missiles, they will bomb us whenever they want, just like in Gaza," Pezeshkian said, referring to the conflict in Gaza between Israel and Hamas.
He reiterated Tehran's official stance, calling on the international community "to first disarm Israel before making the same demands to Iran".
The president also said his country could hold direct talks with the United States if Washington demonstrates "in practice" that it is not hostile to the Islamic Republic.
This came in response to a question during the news conference in Tehran on whether Tehran would be open to direct talks with the US to revive a 2015 nuclear deal.
Former US president Donald Trump reneged on that deal in 2018, arguing it was too generous to Tehran, and restored harsh US sanctions on Iran, prompting Tehran to gradually violate the agreement's nuclear limits.
"We are not hostile towards the US, they should end their hostility towards us by showing their goodwill in practice," said Pezeshkian, adding: "We are brothers with the Americans as well."
After taking office in January 2021, US President Joe Biden tried to negotiate a revival of the nuclear pact under which Iran had restricted its nuclear program in return for relief from US, European Union and UN sanctions.
However, Tehran refused to directly negotiate with Washington and worked mainly through European or Arab intermediaries.
On Russia, the Iranian president affirmed that his government had not transferred any weapons to Russia since it took office in August, after Western powers accused Tehran of delivering ballistic missiles to Moscow in September.
The United States and its allies accused Iran last week of transferring ballistic missiles to Russia for its war in Ukraine, imposing fresh sanctions on Moscow and Tehran.
Russia and Iran both denied the Western claims.
Asked whether Iran had transferred missiles to Russia, Pezeshkian said: "It is possible that a delivery took place in the past... but I can assure you that since I took office, there has not been any such delivery to Russia."
Reuters reported in February that Iran had provided Russia with a large number of powerful surface-to-surface ballistic missiles, deepening the military cooperation between the two US-sanctioned countries.