Iran will strengthen its missile capabilities and will not seek permission from any country to do so, President Hassan Rouhani said in an undisguised snub to demands by US President Donald Trump.
Mr Rouhani's comments at a military event will add to the rising tensions between Tehran and Washington over the Islamic Republic's regional policies.
Tasnim news agency reported that Iran had unveiled a ballistic missile with a range of 2,000km, capable of carrying several warheads.
At the annual United Nations General Assembly on Tuesday, Mr Trump accused Iran of building "dangerous" missiles and exporting violence to Yemen, Syria and other parts of the region.
He also criticised the 2015 pact struck by Iran and six major world powers under which Tehran agreed to restrict its nuclear programme in return for loosening economic sanctions.
In a defiant speech in the capital Tehran, addressing a parade of armed forces, Mr Rouhani said Iran will not stop boosting its military forces.
"We will increase our military power as a deterrent. We will strengthen our missile capabilities ... We will not seek permission from anyone to defend our country," he said in a speech broadcast on state television.
"All countries in the world supported the nuclear deal in the United Nations General Assembly this year except the United States and the Zionist regime (Israel)," Mr Rouhani said.
US Secretary of State Rex Tillerson has said that the agreement must be changed or the United States could not stick with it.
Iran has said its nuclear accord cannot be renegotiated.
The prospect of Washington reneging on the deal has worried some of the US allies that helped negotiate it, especially as the world grapples with North Korea's nuclear and ballistic missile development.
Chinese Foreign Minister Wang Yi said the recent tension on the Korean peninsula underlined the importance of the Iranian deal, and that China would continue to support and safeguard it
Russian Foreign Minister Sergei Lavrov said yesterday that US unilateral sanctions on Iran are "illegitimate and undermines the collective nature of international efforts."