'Iran will continue to produce missiles,' says President Rouhani
In a speech broadcast on state television, the president said he did not consider the country's missile development programme a violation of international accords.
Rouhani spoke days after the US House of Representatives voted for new sanctions on Iran's ballistic missile programme, part of an effort to clamp down on Tehran without immediately moving to undermine a historic nuclear deal.
"We have built, are building and will continue to build missiles, and this violates no international agreements," Rouhani said in a speech in parliament.
"We will produce any weapons of any kind that we need and stockpile it and use it at anytime to defend ourselves."
The US has already imposed unilateral sanctions on Iran, believing its missile tests violate a UN resolution. Washington has called on Tehran not to carry out 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.
Rouhani also criticised the United States after President Donald Trump refused earlier this month to formally certify that Tehran is complying with the 2015 nuclear deal, 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?" Rouhani said.
"Because of the behaviour it has adopted, America should forget any future talks and agreement with other countries," Rouhani added, referring to unnamed countries in East Asia, an apparent reference to North Korea.
Yukiya Amano, the head of the United Nations nuclear watchdog (IAEA) is due to visit Iran on Sunday to discuss Iran's implementation of the nuclear agreement.