President Hassan Rouhani vowed on Friday that Iran would boost its ballistic missile capabilities despite criticism from the United States and also France.
His comments came as Iran displayed a new missile at a military parade marking the anniversary of the outbreak of its devastating 1980-1988 war with Saddam Hussein's Iraq.
"Whether you like it or not, we are going to strengthen our military capabilities which are necessary for deterrence," Rouhani said in a speech broadcast live on state television.
"We will strengthen not only our missiles but also our air, land and sea forces... When it comes to defending our country, we will ask nobody for their permission."
Criticism by the Donald Trump administration of a 2015 nuclear deal between Iran and major powers, including the United States, has focused heavily on Tehran's continuing missile programme.
Tehran says that the missiles are entirely legitimate under the terms of the deal as they are not designed to carry a nuclear warhead.
But Washington says they breach the spirit of the agreement as they have the potential to carry a nuclear warhead and has imposed new sanctions over Tehran's continuing launches and tests.
There has been some sympathy for the US position from France, whose President Emmanuel Macron said the deal could be expanded to ban missile tests and cut a sunset clause in the nuclear agreement that would see Iran resume some uranium enrichment from 2025.
But even he insisted that the core deal not be dumped.
Iran showed off a new missile, named Khoramshahr after a southwestern city, at an anniversary military parade in the capital.
"The Khoramshahr missile has a range of 2,000 kilometres (1,250 miles) and can carry multiple warheads," the official IRNA news agency quoted Revolutionary Guards aerospace chief General Amir Ali Hajizadeh as saying.
Iran says all of its missiles are designed to carry conventional warheads only and has limited their range to a maximum of 2,000 kilometres, although commanders say they have the technology to go further.
That makes them only medium-range but still sufficient to reach Israel or US bases in the Gulf.
Thus far, the UN nuclear watchdog and the US State Department have reported that Tehran has complied with the terms of the nuclear deal.
But Trump, who this week described the deal as an "embarrassment", is due to report to the US Congress on October 15 on whether or not he believes that Iran is in compliance.
If, as now appears increasingly likely, he decides that it is not, it could open the way for renewed US sanctions and perhaps the collapse of the agreement.
Trump said on Wednesday he had made his decision but was not yet ready to reveal it.
Washington has also taken aim at what it says is Tehran's failure to meet expectations that it would play a more stabilising role in the Middle East.
"Regrettably, since the agreement was confirmed we have seen anything but a more peaceful, stable region and this is a real issue," Secretary of State Rex Tillerson told reporters at the United Nations.
Washington has been particularly concerned about Iran's heavy intervention in Syria on the side of the government of President Bashar al-Assad and its support for Shiite rebels in Yemen who control the capital in defiance of its Saudi-backed government.
But Rouhani ruled out any change of policy in the region.
"Whether you like it or not, we are going to defend the oppressed peoples of Yemen, Palestine and Syria," he said.