Iran's Foreign Minister Mohammad Javad Zarif has dismissed US President Donald Trump's "genocidal taunts" and warned him not to threaten the country.
Amid rising tensions, Mr Trump tweeted on Sunday: "If Iran wants to fight, that will be the official end of Iran."
Mr Zarif said the US president should look to history. "Iranians have stood tall for millennia while aggressors all gone... Try respect - it works!"
The US has deployed additional warships and planes to the Gulf in recent days.
But Mr Trump's tweet marked a shift in tone after recent attempts by him to downplay the possibility of a military conflict with Iran. When asked by reporters on Thursday if the US was going to war, he said: "I hope not."
Iranian state media reported on Monday that the country had increased by fourfold its production of low-enriched uranium, which was limited to a 300kg stockpile by the 2015 nuclear deal between Iran and world powers.
Behrouz Kamalvandi, spokesman for the Atomic Energy Organisation of Iran (AEOI), said Iran would "go beyond the 300kg limit in the not too distant future".
"If they want us to maintain this limit, it would be better for European countries to take the measures they want to implement as soon as possible."
Mr Trump unilaterally withdrew the US from the nuclear deal last year, but the European parties say they remain committed to it.
The US president's warning to Iran on Sunday was issued hours after a rocket was fired into the heavily fortified Green Zone in the Iraqi capital, Baghdad, and hit a building about 0.5km (0.3 miles) from the US embassy.
The US recently evacuated non-emergency staff from the mission because of what it called a "serious" threat reportedly linked to Iran-backed forces in Iraq.
Writing on Twitter on Monday, Iran's foreign minister said the US president was being "goaded" by what he called the "B Team" - a reference to US National Security Adviser John Bolton, Israeli Prime Minister Benjamin Netanyahu, and Saudi Crown Prince Mohammad bin Salman.
Mr Trump "hopes to achieve what Alexander [the Great], Genghis [Khan] & other aggressors failed to do. Iranians have stood tall for millennia while aggressors all gone. #EconomicTerrorism & genocidal taunts won't 'end Iran'," he added.
"#NeverThreatenAnIranian. Try respect - it works!"
What is behind the escalation?
Tensions began rising earlier this month, when the US ended exemptions from sanctions for countries still buying from Iran. The decision was intended to bring Iran's oil exports to zero, denying the government its main source of revenue.
Mr Trump reinstated the sanctions last year after abandoning a landmark 2015 nuclear deal between Iran and world powers that he wants to renegotiate.
Days later, Iranian President Hassan Rouhani said his country was suspending several commitments under the deal and threatened to step up uranium enrichment if European countries did not act to protect its oil and banking industries from the effects of the US sanctions with two months.
The White House then announced that the US was sending an aircraft carrier, B-52 bombers and a Patriot missile defence battery to the region because of "troubling and escalatory indications" related to Iran.
Last week, four oil tankers in the Gulf of Oman were damaged in what the United Arab Emirates said were sabotage attacks, and drone attacks on two oil pumping stations in Saudi Arabia by Yemen's Houthi rebels - who are supported by Iran - forced the temporary closure of a pipeline.
Iran has denied that it was behind two incidents.
There were also unconfirmed reports, citing US and regional security officials, that Iran had loaded missiles onto boats in Iranian ports and that Iran-backed Iraqi paramilitary fighters had positioned rockets near facilities in Iraq used by US troops.
What are other countries saying?
"I would say to the Iranians: do not underestimate the resolve on the US side," UK Foreign Secretary Jeremy Hunt told reporters in Geneva on Monday. "They don't want a war with Iran. But if American interests are attacked, they will retaliate."
"We want the situation to de-escalate, because this is a part of the world where things can get triggered accidentally," he added.
Saudi Minister of State for Foreign Affairs, Adel al-Jubeir, said the kingdom "does not want a war, is not looking for it and will do everything to prevent it".
"But at the same time, if the other side chooses war, the kingdom will respond with strength and determination to defend itself and its interests."
The foreign minister of Oman, which has brokered secret talks between the US and Iran in the past, visited Tehran to discuss regional issues with Mr Zarif on Monday.