Iranian Major-General Qassem Soleimani, head of the elite Quds Force, has been killed in a US air strike on his convoy at Baghdad airport, the Pentagon says.
Top Iraqi militia commander Abu Mahdi al-Muhandis, an adviser to Soleimani, was also killed in the attack, a militia spokesman said.
The high-profile assassinations are likely to be a massive blow to Iran, which has been locked in a long conflict with the United States that escalated sharply last week with the storming of the US embassy in Iraq by pro-Iranian militiamen following a US air raid on the Kataib Hezbollah militia, founded by Muhandis.
Iran's top security body will meet to discuss the "criminal" attack that killed Soleimani, its spokesman was quoted as saying by the semi-official Fars news agency.
"In the next few hours, an extraordinary meeting of the Supreme National Security Council will be held to probe the criminal act of attack on commander Soleimani's car in Baghdad, which led to his martyrdom," spokesman Keyvan Khosravi said.
The Pentagon in a statement said: "At the direction of the President, the U.S. military has taken decisive defensive action to protect US personnel abroad by killing Qassem Soleimani."
"This strike was aimed at deterring future Iranian attack plans," it said.
US officials, speaking on the condition of anonymity, said that Soleimani had been killed in a drone strike.
Iran's Revolutionary Guards confirmed in a statement that Soleimani was killed. "Honoured supreme commander of Islam, Haj Qassim Soleimani, was martyred this morning after a life of struggle in an attack by American helicopters," the Revolutionary Guards said in a statement read on state TV.
Ahmed al-Assadi, a spokesman for Iraq's Popular Mobilisation Forces (PMF), the umbrella grouping of Iran-backed militias, blamed the United States and Israel.
"The American and Israeli enemy is responsible for killing the mujahideen Abu Mahdi al-Muhandis and Qassem Soleimani," he said.
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.
Local militia commander Abu Muntathar al-Hussaini told Reuters: "Haj Soleimani and Abu Mahdi al-Muhandis were riding in one vehicle when it was struck by two successive guided missiles launched from an American helicopter while they were on their way from the arrivals hall on the road that leads out of Baghdad Airport."
He said the second vehicle was carrying bodyguards from the PMF and was hit by one rocket.
"The American criminals had detailed information on the convoy's movements."
Oil prices were up $3 on the news.
How have people reacted to the news of the killing
Iranian Foreign Minister Mohammad Javad Zarif said the assassination of Soleimani was "an extremely dangerous and foolish escalation."
"The U.S. bears responsibility for all consequences of its rogue adventurism," he said in a post on Twitter.
"The brutality and stupidity of American terrorist forces in assassinating Commander Soleimani... will undoubtedly make the tree of resistance in the region and the world more prosperous," Zarif said in a statement.
US Senator Chris Murphy, a Democrat, said while Soleimani was "an enemy of the United States," the killing could put more Americans at risk.
"One reason we don't generally (assassinate) foreign political officials is the belief that such action will get more, not less, Americans killed," Murphy said on Twitter.
"That should be our real, pressing and grave worry tonight."
US Secretary of State Mike Pompeo on Twitter said: "Iraqis - Iraqis - dancing in the street for freedom; thankful that General Soleimani is no more."
Former US Vice President Joe Biden said: "This is a hugely escalatory move in an already dangerous region... President Trump just tossed a stick of dynamite into a tinderbox, and he owes the American people an explanation of the strategy and plan to keep safe our troops and embassy personnel, our people and our interests, both here at home and abroad, and our partners throughout the region and beyond."
US Senator Elizabeth Warren, US Democratic Presidential contender, said: "Soleimani was a murderer, responsible for the deaths of thousands, including hundreds of Americans. But this reckless move escalates the situation with Iran and increases the likelihood of more deaths and new Middle East conflict. Our priority must be to avoid another costly war."
Former US Ambassador to the United Nations Nikki Haley said on Twitter: "Qassem Soleimani was an arch terrorist with American blood on his hands.
"His demise should be applauded by all who seek peace and justice.
"Proud of President Trump for doing the strong and right thing."
Former commander of Iran's Revolutionary Guards Mohsen Rezaei, who is now the secretary of a powerful state body, in a post on twitter said: "He joined his martyred brothers, but we will take vigorous revenge on America."
Soleimani's killing marks a dramatic escalation in the regional "shadow war" between Iran and the US and its allies, principally Israel and Saudi Arabia, which could quickly ratchet up tit-for-tat attacks - all the way to the brink of all-out war.
The slain commander's Quds Force, along with its stable of paramilitary proxies from Lebanon's Hezbollah to the PMF in Iraq - battle-hardened militias armed with missiles - has ample means to launch a multi-barrelled response against its enemies.
In September, US officials blamed Iran for a devastating missiles and drones attack on oil installations of Saudi Aramco, the Saudi state energy giant and world's largest oil exporter. The Trump administration did not respond, beyond heated rhetoric and threats.
Iran, for its part, has absorbed scores of air strikes and missile attacks, mainly carried out by Israel against its fighters and proxies in Syria and Iraq.
But analysts say Iran is likely to respond forcefully to the targeting of Soleimani, who it has built into a legend as its influence has spread across the region in the wake of the US-led invasion of Iraq in 2003 and subsequent occupation
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.
The United States and Iran's regional foes Saudi Arabia and Israel have struggled to keep Iran's influence in check.
Soleimani survived several assassination attempts against him by Western, Israeli and Arab agencies over the past two decades.
His 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.
He 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, Syria's government and Shi'ite militia groups in Iraq.
Muhandis, who was killed with Soleimani, oversaw Iraq's PMF, an umbrella grouping of paramilitary groups mostly consisting of Iran-backed Shi'ite militias that was formally integrated into Iraqi armed forces.
Kataib, which received battlefield training from Lebanon's Hezbollah, has long targeted US forces and was one of the earliest groups to dispatch fighters to Syria to support Assad.
In 2009, Washington declared Kataib Hezbollah a foreign terrorist organization, saying it threatened stability in Iraq and declared Muhandis a terrorist. In 2007, a Kuwaiti court sentenced him to death in absentia for his involvement in the 1983 US and French embassy bombings in Kuwait.