Iran will continue to produce missiles for its defence and does not consider that a violation of international accords, President Hassan Rouhani said in a speech broadcast on state television.
Mr Rouhani spoke days after the US House of Representatives voted for new sanctions against Iran's ballistic missile program, part of an effort to clamp down on Tehran without immediately moving to undermine an international nuclear agreement.
He also met the head of the UN nuclear watchdog in Tehran, who again vouched for Iran's compliance with the 2015 accord that curbed its nuclear program in return for sanctions relief, which has drawn fire from US President Donald Trump.
"We have built, are building and will continue to build missiles, and this violates no international agreements," Mr Rouhani said in a speech in parliament on Sunday.
The US has already imposed unilateral sanctions on Iran, saying its missile tests violate a UN resolution that calls on Tehran not to undertake activities related to missiles capable of delivering nuclear weapons.
Iran denies seeking nuclear weapons and says it has no plans to build nuclear-capable missiles.
Mr Rouhani also criticised the US over Mr Trump's refusal this month to formally certify that Tehran is complying with the accord on Iran's nuclear program, even though international inspectors say it is.
"You are disregarding past negotiations and agreements approved by the UN Security Council and expect others to negotiate with you?" Mr Rouhani said.
"Because of the behaviour it has adopted, America should forget any future talks and agreement with other countries," Mr Rouhani added, referring to unnamed countries in East Asia, an apparent reference to North Korea.
Yukiya Amano, the director-general of the International Atomic Energy Agency, met Mr Rouhani, president of the Atomic Energy Organisation of Iran Ali Akbar Salehi, and Foreign Minister Mohammad Javad Zarif in Tehran, an IAEA statement said.
"Director-general Amano reiterated that the nuclear-related commitments undertaken by Iran are being implemented, and that the JCPOA represents a clear gain from a verification point of view," it said, using an abbreviation for the 2015 accord.
"For the future, he stressed the importance of full implementation by Iran of its nuclear-related commitments in order to make the JCPOA sustainable."