Is there any point looking for logic or consistency in the words and deeds of Donald Trump? It can seem a futile task. And yet for at least another year – and perhaps five more – he wields the power of life and death, able on a whim to plunge the world into war. Which means we are obliged at least to try to divine some thread of reason in his actions and statements, if only to prepare ourselves for what could be their lethal consequences.

US kills Iran general Qassem Suleimani in strike ordered by Trump Read more

The latest, and gravest, conundrum is posed by the assassination on Trump’s orders of Qassem Suleimani, a figure of towering military and political authority in Iran. On the one hand, the closest we have to a Trump doctrine of foreign policy is an aversion to military entanglements, especially in the Middle East. He has derided his predecessors, Republican and Democrat, for getting bogged down in unwinnable wars in that region. In October he spelled it out explicitly: “We’re getting out. Let someone else fight over this long blood-stained sand.”

And yet the killing of Suleimani threatens to spill more blood in the Middle East and beyond, pulling the United States into a war of retaliation every bit as vicious as those Trump has condemned as pointless and doomed. Suleimani was more than a mere general: he was the architect of Iran’s policy in the region; the mastermind behind its proxies in Lebanon, Syria, Yemen and Iraq; a close ally of the supreme leader, Ali Khamenei; a possible future president. There is no way Tehran can let his death go unavenged. Tellingly, and for the very first time, Khamenei attended (and chaired) a meeting of Iran’s national security council on Friday to discuss the country’s response. A ruling circle divided over its nuclear ambitions is now united in fury at this killing – and Iran has shown before, with terror strikes as far away as Argentina, that its arm is long.

How, then, to square these two things? How to make sense of a US president supposedly against Middle Eastern wars nevertheless risking war by escalating an already tense standoff with one of the region’s dominant powers?

An immediate answer is to say that you can’t, that there is no logic to be found because Trump will not have thought through the implications of his actions. This was not JFK during the Cuban missile crisis, surrounded by generals, diplomats and top-drawer cabinet secretaries, but Donald Trump on vacation at Mar-a-Lago, circled by the yes men and nodding dogs that now constitute his inner team. Trump is a stranger to strategic thinking, driven chiefly by his gut, unable to think even one move ahead. The contrast with the Iranians, engaged in a 40-year long game aimed at driving the US out of the Middle East, is sharp. In the words of one US analyst, “We’re playing checkers. The Iranians are playing chess.”

Viewed like this, the Suleimani assassination may seem to contradict Trump’s policy, but it’s wholly in keeping with his character. For one thing, as Karin von Hippel, a state department official under Barack Obama and now director of the Royal United Services Institute, puts it, “Trump likes to look macho.” The short, sharp shock of a tactical strike appeals to him, just as it did when he fired a few cruise missiles at Syria to slap the wrist of the Assad regime over the use of chemical weapons. It looks strong and decisive, while apparently avoiding any risk of being dragged into a quagmire.

Some have noted that both George W Bush and Obama had opportunities to kill Suleimani and chose not to, seeing this as evidence of Trump’s recklessness. And yet that’s precisely why this move would have appealed to Trump. He prides himself on daring to wade in where his predecessors feared to tread, with the 2018 move of the US embassy from Tel Aviv to Jerusalem the textbook example. Others might admire Bush and Obama’s relative restraint; he sees it as wimpish cowardice.

Play Video 1:08 'Down with USA': protests sweep Iran after assassination of Qassem Suleimani – video

Obama is especially important here. Trump is obsessed with his predecessor and has been bent on erasing his legacy, whether that’s healthcare at home or the Iran nuclear agreement abroad. As my colleague Julian Borger has wisely noted, the current confrontation with Tehran has come about in part through Trump’s determination to destroy the nuclear deal and seek instead to break Iran through economic sanctions.

The immediate trigger was the killing of a US contractor in Iraq and an attack by a pro-Iranian group on the US embassy in Baghdad. Trump saw those events as the crossing of a red line and, unlike Obama in the Syria case, he was adamant that no such violation could occur without a lethal response. The attack on the embassy would have struck a particularly neuralgic spot for Trump, whose political worldview seems to have taken shape in the 1970s – and largely stayed there. He will have remembered the humiliation of the US embassy siege in Tehran that began in 1979, the way it crippled Jimmy Carter’s presidency in an election year, and have been insistent on avoiding any repeat on his watch.

But the deeper provocation was surely the tweet from Khamenei on Wednesday, when Iran’s supreme leader replied to a bellicose post from Trump – “This is not a Warning, it is a Threat” – with the words, “You can’t do anything”. That was surely an egregious miscalculation on Tehran’s part, underestimating the extent to which Trump will put his ego ahead of all other considerations.

Khamenei would have done well to remember another defining trait of Trump’s character: his tendency to project, attributing to others the negative qualities most clearly apparent in himself. With that in mind, a quick scroll through Trump’s Twitter archive would have provided a clue to Thursday’s drone strike on Iran’s second most powerful man. For what did Trump tweet back in November 2011, as the US entered an election year? “In order to get [re-]elected, @BarackObama will start a war with Iran.”

There were plenty more in that vein over the next 12 months, which perhaps gives an insight into how Trump is approaching his own re-election effort. Trump’s defenders will say there is nothing to fear, that a bad man with much blood on his hands has been removed. That Iran’s ability to hit back is diminished, thanks to those choking sanctions and indeed the elimination of the pivotal Suleimani. That this will not just boost Trump’s standing at home but even in the Middle East, where brute force is the one language everyone understands. That he will get away with this, despite all the bien pensant wails and warnings, just as he got away with the Jerusalem embassy move. That while an expert such as Sanam Vakil of Chatham House might say that “this time the gloves will be off”, and that Iran will no longer hide behind the plausible deniability offered by proxies but will “strike back and strike back directly”, there is nothing to fear because Tehran will be smart enough to know its own limits, restrained by the certainty that the US could answer any attempt at retaliation with devastating force.

Trump’s defenders will say all that, and they may even be right. But they miss, as Trump misses, the risk of accidents, of misread signals, of unintended consequences – the very things that sucked so many of his predecessors into quagmires they hoped to avoid. They miss too the inherent contradiction in the Trump doctrine: that pulling out of a region, as Trump hopes to pull out of the Middle East, leaves you a weaker, more exposed target in the eyes of those who want to humiliate you on your way out. Trump wants to withdraw but he also wants to avoid humiliation. That’s the tension, the contradiction, that has exploded this week. Trump refuses to face it. But the rest of us may not have that luxury.

• Jonathan Freedland is a Guardian columnist