President Donald Trump has said the US killing of Iranian commander Qasem Soleimani saved a lot of lives, calling him a "monster".
Mr Trump said Soleimani "was planning a big attack" when he was killed in a US drone strike in Baghdad last Friday.
But Mr Trump appeared to draw back from a threat to target Iran's cultural sites should Tehran respond militarily.
Iran was burying Soleimani on Tuesday, but a stampede at the funeral killed 50 people and injured 200 more.
In remarks at the Oval Office, President Trump also addressed the issue of Iraq, saying a US withdrawal of troops would be the worst thing for the country.
His comments came in the wake of a letter, which the US military said had been sent in error, to Iraq's prime minister, apparently agreeing to a request by Iraqi MPs to pull troops out.
Soleimani's killing has raised fears of a conflict between the US and Iran.
What are Mr Trump's latest comments?
The president strongly defended the US drone strike, saying it was a case of retaliation.
"He was a monster. And he's no longer a monster. He's dead," Mr Trump said. "He was planning a big attack and bad attack for us. I don't think anyone can complain about it."
The president said Soleimani had been "travelling with the head of Hezbollah" and a "lot of lives had been saved by killing him". Mr Trump was probably referring to Abu Mahdi al-Muhandis, the head of Iraq's Kataib Hezbollah militia group, who died alongside Soleimani.
Mr Trump also discussed the issue of Iran's cultural sites. He had earlier vowed to hit them "very fast and hard" if Iran carried out revenge attacks.
But the UN and even his own top aides accepted this would contravene international laws the US had signed up to, with others describing it as a war crime.
Mr Trump said that "according to various laws" the US should not target these cultural sites. "You know what, if that's what the law is, I like to obey the law," he said.
On Iraq, Mr Trump said he would like to withdraw troops at some point but "this isn't the right point".
On another of his earlier threats - to hit Iraq with sanctions if it told the US to leave - he said he would only do this if the US were not treated with respect.
Nato and the US have said troops are being redeployed in Iraq amid concern for possible revenge attacks.
What happened at Soleimani's burial?
A funeral procession for the commander began early on Tuesday in his hometown of Kerman in south-eastern Iran and attracted massive crowds.
Eyewitnesses told BBC Persian the streets were not wide enough to hold the number of people and, with other roads closed off, there was nowhere to escape to.
Video online showed people on the ground, their faces covered by clothing.
The burial was delayed but restarted later in the day, although it was unclear if it had been completed.
Video footage showed the procession of Soleimani's casket. People threw items of clothing which officials touched against the casket before returning them.
The burial is the last in a series of funeral events that have brought millions on to the streets in Iran.
As head of the Quds force, Soleimani was tasked with defending and projecting Iranian interests abroad. He was hailed as a hero by many in his home country.
What else has the US said?
Secretary of State Mike Pompeo and Defence Secretary Mark Esper both held briefings on Tuesday, as the US continued to state its case.
Mr Pompeo referred to media reports that Soleimani had been on a peace mission to Baghdad at the time he was killed, saying: "We know that wasn't true."
Mr Esper said: "I think we should expect that [Iran] will retaliate in some way, shape or form," either through proxy groups in the region or "by their own hand".
He said: "We are not looking to start a war with Iran but we are prepared to finish one."
Mr Esper touched on the US intelligence behind the decision to kill Soleimani, saying an attack masterminded by him had been expected within days.
More details would be passed to a select number of congressional figures, he said.
What are the latest Iranian comments?
Leading Iranian officials have renewed their threats of revenge. "The martyr Qasem Soleimani is more powerful... now that he is dead," the Revolutionary Guards' top general, Maj Gen Hossein Salami, told crowds in Kerman.
Foreign Minister Javad Zarif called Soleimani's killing an "act of war" and said Iran's response would be against "legitimate targets".
Mr Zarif said President Trump had been "misled" by Mr Pompeo.
"[Pompeo] believes people were dancing in the streets of Tehran and Baghdad... Now I think that he has seen the sea of humanity in Iraq and Iran yesterday. Doesn't he want to admit that he's been misdirecting American foreign policy?" Mr Zarif asked.