Boris Johnson has said General Qasem Soleimani, killed by a US drone strike last week, had «the blood of British troops on his hands».
He told the Commons the Iranian general was also responsible for a string of attacks on innocent civilians but called for «urgent de-escalation».
He warned Iran not to repeat «reckless» attacks after ballistic missiles were fired at Iraqi air bases earlier.
Iran’s Revolutionary Guard said they were in response to Soleimani’s death.
It came as President Trump on Wednesday urged countries including the UK — to send a «clear and united message» to Iran that its «campaign of terror» will no longer be tolerated.
Mr Trump also called on the UK and its other European allies to abandon the nuclear deal it signed with Iran nuclear deal with in 2015.
But, at Prime Minister’s Questions earlier, Mr Johnson defended the deal, saying it remains the «best way of preventing nuclear proliferation in Iran».
In his first PMQs since Parliament returned from its Christmas break, Mr Johnson said there were no UK casualties in the attacks on Iraqi air bases «as far as we can tell».
«We, of course, condemn the attack on Iraqi military bases hosting coalition forces,» Mr Johnson said.
Labour leader Jeremy Corbyn questioned the legality of the drone strike ordered by US President Donald Trump that killed Soleimani outside Baghdad airport on Friday.
The PM said it was not up the UK to determine whether the strike was legal «since it was not our operation», but added: «I think most reasonable people would accept that the United States has the right to protect its bases and its personnel.»
His comments come after Foreign Secretary Dominic Raab rejected the idea that the killing was an act of war.
Mr Johnson and President Trump have discussed the air strike on Iraqi bases over the phone.
A Downing Street spokesman said the prime minister stressed the need for «urgent de-escalation to avoid further conflict».
Mr Johnson told MPs that Soleimani had supplied «improvised explosive devices to terrorists» which «killed and maimed British troops», adding: «That man had the blood of British troops on his hands.»
Mr Corbyn’s spokesman later said it was «hard to see» how Soleimani’s assassination could be justified as a legal action.
«Since the assassination of senior officials, generals, or ministers of internationally recognised governments is, on the face of it, entirely illegal in international law, that defence — the defence of an imminent threat — has to be made public for there to be any question of there being legality around it,» the spokesman told a Westminster briefing.
He added: «No such evidence has been forthcoming and, on the face of it, it’s hard to see how that would be the case.»
It has taken a while to hear from Boris Johnson directly and I suspect that will surprise a lot of people. It’s been five days since this crisis erupted and this is the first we’ve heard from him.
He’s only talking about it today, frankly, because he has to at PMQs.
This is because of a new approach from No 10. They want to delegate more responsibility to other cabinet ministers and not have the PM responding to every event and crisis.
But it also reflects the fact that in this post-Brexit world, Mr Johnson is having to perform a very delicate balancing act.
On the one hand, he wants to stay close to the Europeans, who we want good relations and a speedy trade deal with. On the other, he doesn’t want to antagonise the US, with whom we want similar things.
That’s why you heard him talking about working solidly with the EU to dial down the conflict but at the same time defending President Trump’s right to act as he did.
The bottom line is that as Brexit unfolds, Mr Johnson is going to have to get pretty good at this diplomatic high-wire act.
Mr Corbyn said US-Iran tensions were in «real risk» of developing into «full-scale war» and asked the prime minister whether British personnel in the area were safe.
Mr Johnson said: «As far as we can tell there were no casualties last night sustained by the US and no British personnel were injured in the attacks.
«We are doing everything we can to protect UK interests in the region, with HMS Defender and HMS Montrose operating in an enhanced state of readiness to protect shipping in the Gulf.»
Mr Johnson will later discuss the situation at a meeting with EU Commission President Ursula von der Leyen.
Iran’s Supreme Leader Ayatollah Khamenei described the missile attack as «a slap in the face» for the US.
The strike showed just a «small part» of the capabilities of the Iranian armed forces, the chief of staff for the military said.
But Iran’s ambassador to the UK, Hamid Baeidinejad, said the attack was an act of self-defence and the country «does not seek escalation or war».
More than a dozen missiles were fired from Iranian territories into Iraq at about 02:00 local time on Wednesday (22:30 GMT on Tuesday).
The al Asad airbase — located in the Anbar province of western Iraq — was hit by at least six missiles.
‘A symbolic attack’
Lydia Wilson of the University of Oxford’s Centre for the Resolution of Intractable Conflict, called it a «symbolic» attack that was not designed to «really damage» US or Iraqi military capabilities.
Real Life. Real News. Real Voices
Help us tell more of the stories that matterBecome a founding member
Noting that Iran used ballistic missiles rather than more sophisticated cruise missiles, she said: «Iran was not going to risk a major escalation in this climate. They’re very overstretched in the region… they’re not going to easily take on the biggest military in the world.»
There are about 400 UK troops stationed in Iraq, primarily to assist Iraqi troops in defeating the Islamic State group.
A Ministry of Defence spokesman said: «We are urgently working to establish the facts on the ground. Our first priority continues to be the security of British personnel.»
Defence Secretary Ben Wallace added that further «volatility» would only benefit terrorist groups «who will seek to capitalise on instability».
In the UK, police were «extremely alert» to any impact the crisis in Iran may have in Britain, the Metropolitan Police commissioner Cressida Dick has said.
On Tuesday, the Royal Navy and military helicopters were put on standby in the Gulf amid the rising tensions in the Middle East.
The government said non-essential UK personnel had also been moved out of the Iraqi capital Baghdad.
Iran had vowed «severe revenge» following the assassination of Soleimani.
The general — who controlled Iran’s proxy forces across the Middle East — was regarded as a terrorist by the US government.
Subscribe to the newsletter news
We hate SPAM and promise to keep your email address safe