In a brief statement, Mr Johnson said the UK “will not lament” the death of Qasem Soleimani, blaming him for “the deaths of thousands of innocent civilians and western personnel”.
He added: “It is clear, however, that all calls for retaliation or reprisals will simply lead to more violence in the region, and they are in no one’s interest.”
Downing Street made clear the call was a reference to Tehran’s threats of revenge rather than Mr Trump’s bellicose warning that he would bomb 52 Iranian sites if the country did retaliate.
Nevertheless, Mr Johnson stopped short of echoing his foreign secretary Dominic Raab’s earlier backing for Washington’s “right” to carry out the airstrike, which happened at Baghdad Airport on Friday.
Mr Raab provoked anger by saying the UK “understands the position the US found themselves in” faced with the choice of whether to kill General Soleimani, adding that the US had “a right to self-defence”.
Notably, the shift came after Mike Pompeo, the US secretary of state – who will host Mr Raab on Thursday – criticised the UK, France and Germany for failing to be “as helpful as I wish that they could be”.
John McDonnell, Labour’s shadow chancellor, reacted to those comments by tweeting: “Raab’s craven support for Trump’s reckless & potentially disastrous action adds to risk of full scale war.”
And Lisa Nandy, a Labour leadership contender, suggested that the UK’s refusal to criticise was because it was “begging the US for a trade deal” as Brexit loomed.
Ministers are due to meet on Monday to discuss the crisis, which has raised fears of all-out war, but no statement can be made to MPs until they return on Tuesday.
Earlier, a non-legally binding bill passed by Iraq’s parliament called for the expulsion of all foreign forces.
Some 400 UK troops are stationed in Iraq in the fight against Islamic State, while the US has 5,200, prompting fears of a withdrawal that could cripple the battle against the terror group.
The Ministry of Defence is understood to be awaiting the decision of the Iraqi government before acting over the soldiers based there as part of the US-led coalition.