Relations between Washington and Tehran have soured even further after US president Donald Trump unleashed an overnight Twitter tirade intended for Iranian president Hassan Rouhani.

“NEVER, EVER THREATEN THE UNITED STATES AGAIN OR YOU WILL SUFFER CONSEQUENCES THE LIKES OF WHICH FEW THROUGHOUT HISTORY HAVE EVER SUFFERED BEFORE”, the president tweeted on Sunday night.

“WE ARE NO LONGER A COUNTRY THAT WILL STAND FOR YOUR DEMENTED WORDS OF VIOLENCE & DEATH. BE CAUTIOUS!”

Iranians take to streets of Tehran in biggest protests since 2012

Mr Trump’s remarks came after a speech from his Iranian counterpart who warned that “America must understand well that peace with Iran is the mother of all peace, and war with Iran is the mother of all wars”.

The war of words is a marked escalation in hostile rhetoric between the two leaders at a time of increased tensions over the fate of the 2015 Iran nuclear deal as well as Tehran’s role in the conflicts in Syria and Yemen.

What did president Rouhani actually say?

The Iranian leader used a speech on Sunday to refer to Mr Trump’s aggressive anti-Iran stance, telling him “not to play with the lion’s tail”.

Those remarks, in turn, came after US secretary of state Mike Pompeo earlier in the day likened Iran’s ruling elite to a “mafia” and pushed for US allies to join them in stopping the purchase of Iranian oil products by the end of the year.

Iran parliament reacts after Trump's withdrawal from nuclear deal Show all 10 1 /10 Iran parliament reacts after Trump's withdrawal from nuclear deal Iran parliament reacts after Trump's withdrawal from nuclear deal Iranian MPs burnt a US flag in parliament after Donald Trump announced America's withdrawal from the nuclear deal. AFP/Islamic Consultative Assembly News Agency Iran parliament reacts after Trump's withdrawal from nuclear deal US President Donald Trump displays a presidential memorandum after announcing his intent to withdraw from the JCPOA Iran nuclear agreement in the Diplomatic Room at the White House. Reuters Iran parliament reacts after Trump's withdrawal from nuclear deal Some Iranian MPs reacted after Trumps decision by shouting 'death to America'. AFP/Islamic Consultative Assembly News Agency Iran parliament reacts after Trump's withdrawal from nuclear deal Iranian lawmakers prepare to burn two pieces of papers representing the US flag and the nuclear deal. AP Iran parliament reacts after Trump's withdrawal from nuclear deal Iran said it will hold talks with signatories to the nuclear deal after Trump's decision to withdraw from the accord, which it branded "psychological warfare". AFP/Islamic Consultative Assembly News Agency Iran parliament reacts after Trump's withdrawal from nuclear deal Several Iranian MPs stood chanting in the Tehran parliament. AFP/Islamic Consultative Assembly News Agency Iran parliament reacts after Trump's withdrawal from nuclear deal Iranian MPs burning a US flag AFP/Islamic Consultative Assembly News Agency Iran parliament reacts after Trump's withdrawal from nuclear deal President Hassan Rouhani addressed the nation in a televised speech in Tehran. He said he'd send his foreign minister to negotiate with countries remaining in the nuclear deal after Trump's decision to pull America from the deal, warning he otherwise would restart enriching uranium "in the next weeks." Iranian Presidency Office via AP Iran parliament reacts after Trump's withdrawal from nuclear deal Iran's press condemned Trump's withdrawal from a multi-party nuclear deal but was divided over whether Tehran should react with patience or withdraw itself. AFP Iran parliament reacts after Trump's withdrawal from nuclear deal Trump announced the US withdrawal from what he called the "defective" multinational nuclear deal with Iran, and said Washington would reinstate sanctions against the Islamic republic. AFP/Getty

In his address to Iranian diplomats, Mr Rouhani did suggest Tehran was open to restoring good relations with the US, as well as with regional rival Saudi Arabia.

The possibility appeared to be shot down by Mr Trump’s fiery response, however, as well as comments from Khalid bin Salman, Saudi Arabia’s ambassador to the US, who wrote on Monday that “it is encouraging to hear US president Donald Trump make clear that we will not approach Iran with the sort of appeasement policies that failed so miserably to halt Nazi Germany’s rise to power … we all need to unite on a broader strategy to address the Iranian regime’s destabilising behaviour.”

Could the rhetorical spat escalate into a real one?

Neither side is actively seeking a military confrontation.

On Monday, Iranian officials dismissed Mr Trump’s threat as “passive”, but the head of Iran’s powerful Revolutionary Guards later accused Mr Trump of trying to wage "psychological warfare".

White House press secretary Sarah Sanders told reporters the president’s tweet was not designed to escalate tensions between the two countries.

“If anybody's inciting anything, look no further than to Iran,” she said, adding that Mr Trump has been “very clear about what he's not going to allow to take place”.

“I don’t want to downplay the comments, as escalation is always possible and hostile rhetoric can have serious consequences, but these remarks come in the context of US domestic politics,” Dr Sanam Vakil, an associate fellow at Chatham House in London, told The Independent.

“And on the Iranian side, the mindset from both more pragmatist and hardline politicians is that the Trump administration is so unpredictable it may be better to wait out his term and hope he doesn’t get re-elected, rather than rise to any bait.”

The Iranian rial, however, plummeted when markets opened on Wednesday to 92,000 to £1.

President Donald Trump states if Iran restarts their nuclear program there will be severe consequences

While Mr Trump’s remarks are markedly hostile, the comments have also drawn comparisons with the president’s infamous warning last year that threats to the US from North Korea would be met with “fire and fury like the world has never seen”.

Despite the tit-for-tat, Mr Trump and Kim Jong-un met face-to-face for a historic summit on peaceful relations and the de-nuclearisation of the Korean peninsula last month.

What does Mr Trump want to achieve in this war of words?

Eighteen months into his presidency, Mr Trump has followed through on campaign promises to be “tough on Iran”, pulling the US out of the 2015 nuclear deal with world powers that lifted crippling sanctions on Iran in exchange for curbs to the country’s nuclear programme.

The White House has promised further economic pressure will follow. It is not clear, however, whether the US’s broader policy is aimed at pushing Tehran into a new nuclear deal on Mr Trump’s terms and dropping its support for militia groups in Lebanon, Syria and Yemen, or forcing regime change altogether.

The goal of regime change is an “unrealistic” one, said Holly Dagres, a non-resident fellow at the Atlantic Council.

Iran's 'Trumpism' contest Show all 10 1 /10 Iran's 'Trumpism' contest Iran's 'Trumpism' contest A picture taken on July 3, 2017 shows a cartoon of US President Donald J. Trump and First Lady Melania Trump on display at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian cartoonist Hadi Asadi poses for a picture with a trophy and an award next to cartoons of US President Donald J. Trump, at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranians look at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian reformist cleric Mahmoud Doaei looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian man looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest An Iranian woman looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images Iran's 'Trumpism' contest Iranian reformist cleric Mahmoud Doaei looks at cartoons of US President Donald J. Trump at an exhibition of the Islamic Republic's 2017 International Trumpism cartoon and caricature contest, in the capital Tehran on July 3, 2017. / AFP PHOTO / ATTA KENARE (Photo credit should read ATTA KENARE/AFP/Getty Images) AFP/Getty Images

“[The US] hopes that strangling the Iranian economy will push people into the streets and bring unrest, eventually leading to the collapse of the Islamic Republic,” she told The Independent.

“Trump's Iran policy is only rallying Iranians around the flag of their government, to the point that rivalling factions – the hardliners and pragmatists like Rouhani – are putting their differences aside to join forces to defend their country.”

It has also been suggested Mr Trump’s attack on Mr Rouhani was designed to draw attention away from criticism of his performance at a bilateral summit with Russian president Vladimir Putin in Helsinki last week.