WASHINGTON/ANKARA (Reuters) - Iran on Monday dismissed an angry warning from U.S. President Donald Trump that Tehran risked dire consequences “the like of which few throughout history have suffered before” if it made threats against the United States.

Iranian Foreign Minister Mohammad Javad Zarif hit back at Trump’s warning, which the U.S. leader delivered written in capital letters in a late-night tweet.

“COLOR US UNIMPRESSED: The world heard even harsher bluster a few months ago. And Iranians have heard them - albeit more civilized ones - for 40 yrs. We’ve been around for millennia & seen fall of empires, incl our own, which lasted more than the life of some countries,” Zarif wrote on Twitter.

“BE CAUTIOUS!” he wrote in capital letters, echoing exact words from Trump.

Iran has been under increasing U.S. pressure and possible sanctions since Trump’s decision in May to withdraw the United States from a 2015 agreement between world powers and Iran over its disputed nuclear program.

Bitter foes since Iran’s 1979 revolution, Washington and Tehran have cranked up talk of war in recent days.

The Trump administration has launched an offensive of speeches and online communications meant to foment unrest and help pressure Iran to end its nuclear program and its support of militant groups.

Despite the heightened rhetoric, both sides have reasons to want to avoid starting a conflict.

Trump’s words appeared to be in response to Iranian President Hassan Rouhani saying that hostile policies toward Tehran could lead to “the mother of all wars.”

In his tweet directed at Rouhani, Trump wrote: “Never, ever threaten the United States again or you will suffer consequences the likes of which few throughout history have ever suffered before. We are no longer a country that will stand for your demented words of violence & death. Be cautious!”

Rouhani had told a gathering of Iranian diplomats on Sunday: “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,” said Rouhani, quoted by the state news agency IRNA.

“OBVIOUS MISTAKE”

Trump is under pressure from U.S. lawmakers for taking too soft a line against Russia in a summit last week with President Vladimir Putin.

“President Trump has failed to assure Americans he would side with us over Russia. To distract from the Helsinki disaster, he has launched a childish all-caps Twitter tirade against Iran. Barstool threats don’t make us safe, they make us look silly and weak,” said Congressman Eric Swalwell, a Democrat on the House of Representatives Permanent Select Committee on Intelligence.

Trump’s Iran tweet resembled ones he issued last year to warn North Korea over its nuclear weapons program. But in June, Trump met North Korean leader Kim Jong Un in the first U.S.-North Korean summit. After the meeting both sides declared a new friendship and made vague pledges of nuclear disarmament.

At the White House, Trump later on Monday said, “none at all,” in response to a shouted question about whether he had any concerns about provoking tensions with Iran.

FILE PHOTO: U.S. President Donald Trump speaks about his summit meeting with Russian President Vladimir Putin as he begins a meeting with members of the U.S. Congress at the White House in Washington, July 17, 2018. REUTERS/Leah Millis/File Photo

Although Rouhani left open the possibility of peace between Tehran and Washington, Iran’s most powerful authority Supreme Leader Ayatollah Ali Khamenei on Saturday ruled out negotiations with the United States as an “obvious mistake.”

There is limited appetite in Washington for a conflict with Iran, not least because of the difficulties the U.S. military faced in Iraq after its 2003 invasion but also because of the impact on the global economy if conflict raised oil prices.

Many ordinary Iranians are worried that the war of words might lead to a military confrontation but insiders in Tehran told Reuters they believed the Trump administration would not drag the United States into another quagmire in the Middle East.

With popular discontent over Iran’s faltering economy and sliding currency, and the prospect of tough new U.S. sanctions, Iran’s leaders have called for unity.

The Iranian rial plunged to a record low against the U.S. dollar on the unofficial market on Monday amid fears of a military confrontation. The dollar was being offered for as much as 92,000 rials, compared to around 75,000 last week.

Many Iranians are largely skeptical of the Trump administration’s professed support for Iranian citizens because of the harsh U.S. sanctions on the country and a visa ban imposed on Iranians barring them from entering the United States.

While Washington prepares to reimpose economic sanctions on Tehran after pulling out of the nuclear deal, Iran’s faction-ridden religious and political elites have closed ranks against Trump’s hawkish approach to Tehran.

However, growing strains with the United States will eventually boost Rouhani’s anti-Western hardline rivals who fear losing power if the nuclear accord, championed by Rouhani, ended the country’s political and economic isolation.

While the United States has a substantial military presence in the region, a full-scale military confrontation with Iran would be a major, costly endeavor that could eclipse the U.S. war in Iraq. It could also distract from other U.S. national security priorities, including Russia and North Korea.

In reaction to Iran’s threats, the U.S. military has renewed a vow to secure the free flow of oil from the Strait of Hormuz. However, at least as of last week, the Pentagon said those Iranian threats had not led the U.S. military to reposition or add to forces in the Middle East.

“We haven’t adjusted our force posture in response to any of those statements. And I don’t think that’s warranted. I wouldn’t recommend that,” John Rood, under secretary of defense for policy, told a security forum in Colorado on Friday.