Tensions between Tehran and Washington have escalated to the highest level in a decade, after both Iranian President Hassan Rouhani and U.S. President Donald Trump threatened each other in bone-chilling terms over recent days.

Speaking on Sunday to high-ranking diplomats in Tehran, Rouhani warned Trump that "war with Iran will be the mother of all wars" and cautioned Washington not to "play with fire." Yet at another point, he also struck a conciliatory tone by saying "peace with Iran is the mother of all peace."

However, the more bellicose part of the message quickly stimulate Trump, who on May 8 pulled the United States out of the Iran nuclear deal, to tweet -- IN ALL CAPS -- unprecedented punishment if Iran ever, EVER threatened the United State again.

"To Iranian President Rouhani: 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!" Trump wrote.

That in turn prompted Iranian Foreign Minister Mohammad Javad Zarif on Monday to urge the U.S. president himself to "be cautious."

"The world heard even harsher bluster a few months ago," Zarif wrote on his own Twitter account, in an apparent reference to Trump's threat, in a speech to the U.N. General Assembly last September, to "totally destroy North Korea."

Some U.S. news analysts have suggested Trump's latest outburst against Iran was actually motivated by Trump's desire to deflect attention from his performance at a summit with Russian President Vladimir Putin in Helsinki, and to do something quickly to appear strong and feared.

Be that as it may, Trump's latest Twitter tantrum has prompted the Iranian leadership to contemplate actions that really could lead to actual conflict.

Iranian Supreme Leader Ayatollah Ali Khamenei on Saturday supported Rouhani's suggestion of blocking oil shipments through the Persian Gulf if Iran is prevented from selling its oil by U.S. sanctions which come into effect in November.

Rouhani did not elaborate on how Iran would do so. But he apparently meant closing the Strait of Hormuz at the southern end of the Persian Gulf, one of the world's most strategically important choke points, or making it risky for oil tankers to pass through the Persian Gulf.

Abbas Araghchi, a veteran Iranian diplomat and the chief nuclear negotiator in negotiations with the European Union to salvage the 2015 nuclear accord between Iran and world powers, said Monday that Iran can't sit idle and watch as other Gulf countries export oil while its oil exports are blocked.

"We have various options to face with new oil sanctions and the Strait of Hormuz is just one of those options," Araghchi said on state television.

Tensions have spiked between Iran and the United States before. They did so when Iran seized two U.S. navy riverine command boats in Iranian territorial waters in the Persian Gulf and its Revolutionary Guards arrested 10 U.S. navy commandos. Or when the U.S. Navy fired warning shots at speedy Iranian military boats. But always the two sides were careful to avoid serious conflict.

But after the recent exchanges between Tehran and Washington, Iranians are increasingly worried about the potential for conflict, and their buying of precious metals such as gold and gold coins reflects that heightened concern.

The price of gold soared more than 30 percent over a single day recently because of all the Iranians rushing to buying the yellow metal, commonly viewed as a good way to preserve wealth in volatile times.

Ali Vaez, the Washington-based director of the Iran section at the International Crisis Group, believes there is so much friction between Iran and the United States and their respective regional allies that any increase in tensions raises the risk of an intended or inadvertent clash across a range of flash points.

At the moment, the highest risk of a limited -- yet perilous -- clash is over Yemen or Syria, Vaez said.

Tehran claims that Trump's belligerent foreign policy has isolated the United States globally, and that the European Union and many other countries stand with Iran.

But some of Iran's neighbors who are U.S. allies clearly support putting pressure on Iran. Israel, Saudi Arabia and the United Arab Emirates in particular feel empowered by the Trump administration's overt hostility toward Iran.

In Iran itself, Rouhani was elected president mainly because of his moderate approach toward seeking a detente with the West. But that approach faces an uncertain future now that Washington has withdrawn from the nuclear deal with Iran, and quickly moved to use its tremendous economic leverage to pressure all other nations to stop importing Iranian oil, the life-blood of the Iranian economy.

Rouhani's own rhetoric is already more similar to that of hardliner groups. Unlike during his first term, he now uses harsher language when speaking about the West these days.

Rouhani has been burned by advocating dialogue with the United States and at this stage has no choice but to sound and act in ways that protect him against hardliner criticism. The irony of this situation is that Rouhani has to become a hardliner himself in order to survive politically, Vaez said, referring to how Rouhani has changed since May 8.

On May 8, President Trump withdrew the United States from the accord struck under his predecessor Barack Obama and pledged "the highest level of economic sanction" against Iran, calling it "the leading state sponsor of terror."

Under the deal struck between Iran and six major powers -- Britain, China, France, Germany, Russia and the United States -- in Vienna in 2015, Tehran agreed to curb its nuclear activities in exchange for the lifting of crippling economic sanctions.