Donald Trump has again taken to Twitter to enter a war of words with a rival world leader.

Having previously traded insults with North Korean president Kim Jong-un, including a row over who has the biggest red nuclear button, the US president has turned his attention to his Iranian counterpart, Hassan Rouhani.

The feud relates to President Trump’s decision to withdraw the US from the deal struck in 2015 with the Barack Obama administration, which saw international sanctions against the Middle Eastern power eased in exchange for its agreeing to greatly reduce its nuclear programme, the subject of Western suspicions since 2003.

What was said?

At a meeting of Tehran’s diplomatic corps, President Rouhani was quoted by the state news agency IRNA as saying: “America should know that peace with Iran is the mother of all peace and war with Iran is the mother of all wars”.

He also warned the US was “playing with the lion’s tail” in provoking Iran.

Angry enough to tweet his response with his caps lock on, President Trump wrote:

“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!”

Why are US-Iran relations so tense?

Western powers and the International Atomic Energy Association (IAEA) have long feared that Iranian enrichment of uranium as part of its nuclear power generation programme was really being undertaken for use in the secret construction of a weapon of mass destruction.

The country’s supreme leader, Ayatollah Seyyed Ali Khamenei, has consistently denied this, saying that the building of such a bomb would contravene Islamic strictures.

After halting enrichment as a gesture of good faith in 2003, Iranian president Mahmoud Ahmadinejad quietly ramped up production before severing ties with the IAEA and its inspectors three years later. The UN Security Council responded by unanimously voting in favour of economic sanctions against Tehran in December 2006.

Suspicion over Iran’s intentions and an atmosphere of mutual mistrust prevailed until the EU announced a ban on the import of Iranian crude oil and petroleum in January 2012, a significant financial blow.

New president Hassan Rouhani reiterated Ayatollah Khamenei’s stance in an address to the UN General Assembly in September 2013: “Nuclear weapons and other weapons of mass destruction have no place in Iran’s security and defence doctrine and contradict our fundamental religious and ethical convictions.”

In July 2015, the Joint Comprehensive Plan of Action to control Iranian nuclear activity developed by the US, China, the UK, France, Germany and Russia was signed but, by the following spring, Tehran had begun testing ballistic missiles.

The new US president’s short-lived national security chief Michael Flynn said Iran was “on notice” as a result of the tests in January 2017, a prelude to Donald Trump’s decertification of US compliance in the agreement in May 2018, arguing it was never in America’s best interests and “the worst deal ever”.

In the interim, Mr Rouhani described his new adversary as a “rogue newcomer to the world of politics” and the pair have meanwhile clashed over other issues, including the US decision to move its Israeli embassy from Tel Aviv to Jerusalem and introduce a ban on citizens from several Muslim-majority countries, including Iran, from travelling to the US.

Could Iran develop a nuclear weapon?

Tehran has the centrifuges in place to enrich uranium for use in nuclear power generation, but whether its ultimate intentions for the technology are benign or more sinister remains the great unknown from a Western perspective.

The recent run of mid-range missile testing appears an ominous sign of the regime’s military ambitions but, prior to the 2015 deal, the country had only enriched the mineral to 20 per cent purity so it would need to massively ramp up production to be able to reach the 90 per cent needed to achieve weapons-grade potential.

Trump in Helsinki: Putin meeting and protests Show all 16 1 /16 Trump in Helsinki: Putin meeting and protests Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters Trump in Helsinki: Putin meeting and protests An advert from Finnish newspaper Helsingin Sanomat is on display in Helsinki Reuters Trump in Helsinki: Putin meeting and protests President Trump in a meeting with Finnish President Sauli Niinisto AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Finnish President Sauli Niinisto in Helsinki EPA Trump in Helsinki: Putin meeting and protests President Trump talks with Finnish President Sauli Niinisto in Mantyniemi, the official residence of the Finnish President EPA Trump in Helsinki: Putin meeting and protests US, Finnish and Russian flags fly in front of the Presidential Palace in Helsinki EPA Trump in Helsinki: Putin meeting and protests A protester wears a mask featuring a portrait of Russian President Vladimir Putin during the so-called "Helsinki against Trump and Putin" demonstration on July 16, 2018, in the Finnish capital Helsinki. The US and Russian leaders opened an historic summit in Helsinki on Monday, with Donald Trump promising an "extraordinary relationship" and Vladimir Putin saying it was high time to thrash out disputes around the world. / AFP PHOTO / Jonathan NACKSTRANDJONATHAN NACKSTRAND/AFP/Getty Images JONATHAN NACKSTRAND AFP/Getty Trump in Helsinki: Putin meeting and protests Vladimir Putin gifts a football to President Trump at the press conference that followed their meeting AP Trump in Helsinki: Putin meeting and protests Trump supporters hold banners during a demonstration in Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests People protest for women's reproductive rights in Helsinki's Senate Square Reuters Trump in Helsinki: Putin meeting and protests A crowd watches the motorcade transporting President Trump through Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests Russian President Putin drives through Helsinki on his way to meet with President Trump EPA Trump in Helsinki: Putin meeting and protests A man in the audience of the joint press conference holds up a sign sign that reads "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests A man is removed from the joint press conference in Helsinki. Security removed the man after he pulled out a sign that read "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests President Trump and Russia's President Putin sit for a working lunch in Finland's Presidential Palace AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters

In signing that agreement, Tehran also agreed to reduce its uranium stockpile by 98 per cent and cut its total number of centrifuges from 20,000 by two-thirds so significant rebuilding would be required, a process designed to take at least 12 months, giving the international community plenty of notice.

Whether its scientists even have the necessary expertise in place to carry out such a plan has been called into question, notably by the IAEA in a 2015 report.

The threat of sanctions are also a powerful deterrent. Many Iranians were optimistic about the Islamic Republic’s potential as an emerging market primed for growth when the 2015 deal was signed but the US withdrawal under President Trump risks leaving the country isolated once more.