A British prime minister flies back from a Caribbean holiday where he has been, courtesy of millionaire friends, sunning himself on yachts while the Middle East is in flames and Britain in the grip of a security crisis. Britain’s key ally is accused of war crimes on foreign soil in a fight with Iran and its regional proxies. European opinion has quickly solidified around the idea that both sides show restraint. The British response is to defy this advice and endorse a belligerent US administration’s approach. Deja vu? It certainly should sound familiar.

The year was 2006 and the British prime minister was Tony Blair. His stubborn refusal to call for a ceasefire between Israel and Hezbollah in Lebanon dealt, by his own account, a “fatal blow” to his premiership.

Boris Johnson could console himself that history does not quite repeat itself. He ought not to. Today’s crisis in the Middle East is much more dangerous and volatile than the one faced by his predecessor. Unlike Mr Blair, the current Downing Street incumbent is unproven in war. Mr Johnson is also dealing with a far more unstable, narcissistic and bullying president in the shape of Donald Trump than Mr Blair did. The fact Mr Trump did not think it necessary to inform Britain of his rash decision to assassinate Qassem Suleimani – Iran’s second most important leader after Ayatollah Khamenei – ought to tell Mr Johnson how little the White House thinks of him. Because the prime minister refused to return home early, his foreign secretary ate his own words in public. Dominic Raab was given a dressing down by his US counterpart after first siding with Europe over the almost certainly illegal killing of the thuggish Suleimani. It was disappointing to see Mr Raab replace his temperate response with self-serving US propaganda.

There appears barely any credible evidence of an imminent threat to the US from Suleimani or his Iranian-backed militias. Mr Trump has succeeded in replacing the media focus on his impeachment with the fallout from his lethal strike. This will not be inconsiderable: the Iraqi parliamentary vote for a motion calling for the ejection of US troops from the country is a taste of things to come. Mr Trump lacks the imagination to see the issues involved in the Middle East. The killing of the Iranian general is just another example of the failure of his “maximum pressure campaign” on Iran. His idea that crippling economic sanctions would force Tehran to capitulate only saw its leadership make bold military moves against both Arab rivals and western interests while restarting key parts of its nuclear programme.

Mr Trump projects the image of a strongman. Yet his actions have weakened the US strategic position in the Middle East. The national interest is not a guide to Mr Trump’s action. What matters is personal political advantage in a US election year. To stoke his evangelical base he presents his rivalry with Iran as a clash of civilisations. It is appalling that he thinks a legitimate military response is to commit war crimes by levelling Iran’s historic monuments. Mr Trump fears a public who already hold his policies responsible for tensions with Tehran. Whatever the Iranian retaliation it will be a messy outcome with no easy way for Mr Trump to pin the blame for war on anyone but himself.

Mr Johnson faces the first test of Britain’s post-Brexit foreign policy posture. Unlike George W Bush, Mr Trump won’t offer the British prime minister a way to sit out any upcoming war. He does not give help for free. He expects a quid pro quo. Jumping into the trenches with the US over a war Britain does not want may be the price Mr Johnson has to pay for a post-Brexit US-UK trade deal. There is a certain truth about the danger of any British prime minister swinging away from conventional wisdom and from British public opinion. Mr Blair was derided because it was said he let Britain become America’s poodle. This time the country risks ending up as its lapdog.