Iranian President Hassan Rouhani has cautioned US President Donald Trump about pursuing hostile policies against Iran, saying "America should know war with Iran is the mother of all wars".
However, Mr Rouhani did not rule out peace between the two countries either.
Iran faces increased US pressure and looming sanctions after Mr Trump's decision to withdraw the United States from a 2015 international deal over Iran's nuclear programme.
Addressing a gathering of Iranian diplomats, Mr Rouhani said: "Mr Trump, don't play with the lion's tail, this would only lead to regret".
"America should know that peace with Iran is the mother of all peace, and war with Iran is the mother of all wars," Mr Rouhani said, leaving open the possibility of peace between the two countries which have been at odds since the 1979 Islamic Revolution.
"You are not in a position to incite the Iranian nation against Iran's security and interests," Mr Rouhani said, in an apparent reference to reported efforts by Washington to destabilise Iran's Islamic government.
In Washington, US officials familiar with the matter told Reuters that the Trump administration has launched an offensive of speeches and online communications meant to foment unrest and help pressure Iran to end its nuclear programme and its support of militant groups.
Current and former US officials said the campaign paints Iranian leaders in a harsh light, at times using information that is exaggerated or contradicts other official pronouncements, including comments by previous administrations.
Mr Rouhani scoffed at Mr Trump's threat to halt Iranian oil exports and said Iran has a dominant position in the Gulf and the Strait of Hormuz, a major oil shipping waterway.
"Anyone who understands the rudiments of politics doesn't say 'we will stop Iran's oil exports'...we have been the guarantor of the regional waterway's security throughout history," Mr Rouhani said, cited by the semi-official ISNA news agency.
Iran's Supreme Leader Ayatollah Ali Khamenei on Saturday backed Mr Rouhani's suggestion that Iran may block Gulf oil exports if its own exports are halted.
Mr Rouhani's apparent threat earlier this month to disrupt oil shipments from neighbouring countries came in reaction to efforts by Washington to force all countries to stop buying Iranian oil.
Iranian officials have in the past threatened to block the Strait of Hormuz in retaliation for any hostile US action.
Separately, a top Iranian military commander warned that the Trump government might be preparing to invade Iran.
"The enemy's behaviour is unpredictable," military chief of staff General Mohammad Baqeri said, the semi-official Tasnim news agency reported.
"Although the current American government does not seem to speak of a military threat, according to precise information it has been trying to persuade the US military to launch a military invasion (of Iran)," Baqeri said.
Iran's oil exports could fall by as much as two-thirds by the end of the year because of new US sanctions, putting oil markets under huge strain amid supply outages elsewhere.
Washington initially planned to totally shut Iran out of global oil markets after Mr Trump abandoned the deal that limited Iran's nuclear ambitions, demanding all other countries to stop buying its crude by November.
But it has somewhat eased its stance since, saying that it may grant sanction waivers to some allies that are particularly reliant on Iranian supplies.