US President Donald Trump ordered the killing of Iran Revolutionary Guards commander Qasem Soleimani, who died in Baghdad "in a decisive defensive action to protect US personnel abroad," the Pentagon said.
"General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region. General Soleimani and his Quds Force were responsible for the deaths of hundreds of American and coalition service members and the wounding of thousands more," the Department of Defence said.
Following Soleimani's death, Trump tweeted an image of the US flag without any further explanation.
The strike, which occurred at Baghdad's international airport on Friday in Iraq, also killed the deputy chief of Iraq's powerful Hashed al-Shaabi paramilitary force.
A pro-Iran mob this week laid siege to the US embassy following deadly American air strikes on a hardline Hashed faction.
The US had called the strikes in response to a rocket attack days earlier that had killed an American contractor working in Iraq.
The Baghdad airport was hit in a volley of missiles just after midnight Friday, Iraq's military had announced.
Security sources told AFP the bombardment hit a Hashed convoy and killed eight people, including "important figures." Soleimani heads the Islamic Revolutionary Guard Corps' Quds Force and also serves as Iran's pointman on Iraq, visiting the country in times of turmoil.
"At the direction of the President, the US military has taken decisive defensive action to protect US personnel abroad by killing Qasem Soleimani, the head of the Iranian Revolutionary Guard Corps-Quds Force, a US-designated Foreign Terrorist Organization," the Pentagon said.
"This strike was aimed at deterring future Iranian attack plans," it added.
The Pentagon said that Soleimani had orchestrated attacks on coalition bases in Iraq over the past months, including on December 27, the day the US contractor was killed.
"General Soleimani also approved the attacks on the US Embassy in Baghdad that took place this week," it said., head of the elite Quds Force, and Iraqi militia commander Abu Mahdi al-Muhandis were killed early on Friday in an air strike on their convoy at Baghdad airport, an Iraqi militia spokesman told Reuters.
"The American and Israeli enemy is responsible for killing the mujahideen Abu Mahdi al-Muhandis and Qassem Soleimani," said Ahmed al-Assadi, a spokesman for Iraq's Popular Mobilisation Forces umbrella grouping of Iran-backed militias.
Strikes had been carried out against two targets linked to Iran in Baghdad on Thursday, U.S. officials told Reuters. The officials, speaking on condition of anonymity, declined to give any further details.
Iraqi paramilitary groups said on Friday that three rockets hit Baghdad International Airport, killing five members of Iraqi paramilitary groups and two "guests."
The rockets landed near the air cargo terminal, burning two vehicles, killing and injuring several people.
Soleimani, who has led the foreign arm of the Revolutionary Guards and has had a key role in fighting in Syria and Iraq, acquired celebrity status at home and abroad.
He was instrumental in the spread of Iranian influence in the Middle East, which the United States and Tehran's regional foes Saudi Arabia and Israel have struggled to keep in check.
He survived several assassination attempts against him by Western, Israeli and Arab agencies over the past two decades.
Soleimani's Quds Force, tasked with carrying out operations beyond Iran's borders, shored up support for Syrian President Bashar al-Assad when he looked close to defeat in the civil war raging since 2011 and also helped militiamen defeat Islamic State in Iraq.
Soleimani became head of the Quds Force in 1998, a position in which he kept a low profile for years while he strengthened Iran's ties with Hezbollah in Lebanon, Syrian President Bashar al-Assad's government and Shiaite militia groups in Iraq.