In its final hours in office, the British government of Prime Minister Theresa May was still trying to have it both ways, this time in response to Iran’s seizure of a UK-flagged oil tanker in international waters in the Strait of Hormuz.

Foreign Secretary Jeremy Hunt announced plans to form a European-led force to protect Gulf shipping. That’s better than doing nothing — but a passive-aggressive slap at the Trump administration’s drive for a global force to do the same job.

Iran will face “a larger Western military presence” along its coast as a “price” for its belligerence, Hunt warned, vowing that Britain and its allies will always defend “freedom of navigation.”

You’d think the Brits would jump at the chance to work with the world’s largest navy in the Gulf, especially since Europe’s navies are tiny after decades of defense cuts.

But that would annoy the continent’s elites, who are still furious that the Americans nixed the disastrous 2015 nuclear deal with Iran.

That deal pretended Iran could be bribed into becoming a normal nation, yet it has only grown more aggressive in the years since. Notably, Iran seized the ship not over nuke-deal issues, but because the Brits earlier in the month impounded an Iranian tanker that was violating European Union sanctions on the blood-soaked Syrian regime.

Ironically, it’s May’s refusal to break with elite continental opinion that doomed her in the first place, by leading her to utterly bungle negotiations for Britain’s exit from the European Union — the issue of her premiership.

That’s why Britain’s next leader is Boris Johnson, who delights in defying EU absolutists. Expect him to bring closer London-Washington ties on this and other issues.

After all, as Secretary of State Mike Pompeo notes, the Iranian threat is against “all of us.”