One of the few consoling features of Donald Trump’s erratic, self-interested and vainglorious approach to the presidency has been his relative caution in deploying US military power overseas. During his campaign for the White House, Mr Trump promised that, on his watch, the US would not become further entangled in “endless wars” in the Middle East.

By and large, for just over three years, he has stuck to that. Last October, his destabilising decision to withdraw US troops from Syria was heavily criticised. But that retreat at least cohered with the White House’s inward-looking “America First” policy. To the relief of both friends and foes, it seemed that the 45th US president might be impulsive, impolitic, narcissistic and confrontational; but his bombast and bullying nature did not, as was feared at the time of his election, extend to a taste for military adventure with incalculable consequences.

Following Mr Trump’s decision to assassinate the Iranian general Qassem Suleimani in a drone attack at Baghdad airport, that comforting assumption no longer holds. General Suleimani was a ruthless and cynical fomentor of lethal violence against western interests, and played a part in mass killings of civilians at the height of Syria’s civil war. But he was far more than just another “super bad guy” belonging to the same rogue family as the Islamic State leader, Abu Bakr al-Baghdadi, who was killed by US special forces in the autumn. The leader of the Revolutionary Guards’ Quds force was considered the second most powerful figure in the Iranian regime. He was a revered figure in his home country, having first made his reputation during the nation-defining Iran-Iraq conflict in the 1980s. Assassinating him was an act of war against a beleaguered but still militarily potent state.

This was a move so risky that George W Bush rejected similar opportunities, despite General Suleimani’s prominent role in the Iraqi insurgency against American troops following the invasion of 2003. Barack Obama later made the same call. Both thought war with Iran would be the result. Mr Trump, tweeting an American flag to mark the moment, has decided to take the chance. In doing so he has endangered US security and the stability of the world’s most volatile region. This is the Donald Trump the world lay awake at night worrying about.

The immediate explanation for the assassination was provided by the Pentagon, which stated that General Suleimani was planning attacks on American diplomatic personnel and service members in the region. This followed the death of a US contractor during a rocket attack by an Iranian proxy militia.

As Mr Trump must know, the general’s killing has almost certainly ensured that similar attacks will still take place, only on a larger scale – and possibly targeting civilians. Other consequences, some of them catastrophic, could also follow. The Iraqi government, furious at the death of a prominent militia leader in the drone attack, may request the departure of the remaining US troops in the country. The Iranian nuclear deal, which European diplomats have been trying to keep alive following America’s withdrawal from it in 2018, must now be close to collapsing.

The biggest danger though, is the one feared by presidents Bush and Obama: a new war in the Middle East, this time with Trump’s America as a chief protagonist. Tehran is an experienced practitioner of asymmetric warfare, calibrating the impact of the provocations and outrages it perpetrates. But a miscalculation by an increasingly embattled regime could see all-out conflict break out and other regional actors such as Israel drawn in.

Why take such an extraordinary risk? Mr Trump once declared: “My gut tells me more sometimes than anybody else’s brain can ever tell me.” Since becoming president, he has largely abandoned the more elaborate national security decision-making processes used by former presidents. It is telling that this decision was taken in his Mar-a-lago holiday resort rather than the White House. Maybe, with an election looming, preceded by an impeachment trial, the president’s gut told him that the elimination of another notorious US enemy would help his cause. Whatever the motive, Mr Trump’s ungovernable instincts have taken America and the Middle East into dangerous and uncharted waters.