LONDON — Prime Minister Boris Johnson was on the Caribbean island of Mustique, still basking in the glow of his recent election victory, when the news came last Friday that President Trump had ordered the killing of a powerful Iranian general — without tipping off, let alone consulting, his British ally.

The British government was livid about the lack of notice, according to current and former officials, particularly because there are about 400 British troops deployed in Iraq, and Britain has historically been more closely aligned with the United States on combat operations there than any other country.

But Mr. Johnson held his tongue until Sunday evening, after he returned to London. Even then, he issued a carefully worded four-paragraph statement that said he would not “lament” the killing of the general, Qassim Suleimani, warned Iran against reprisals and said nothing about Mr. Trump’s action.

It was a circumspect reaction for a politician not known for his circumspection, and it underscored Mr. Johnson’s predicament as he confronts what is arguably the first foreign policy crisis of the post-Brexit era.