Iran's most powerful military commander, Gen Qasem Soleimani, has been killed by a US air strike in Iraq.
The 62-year-old spearheaded Iranian military operations in the Middle East as head of Iran's elite Quds Force.
He was killed at Baghdad airport, along with other Iran-backed militia figures, early on Friday in a strike ordered by US President Donald Trump.
Mr Trump said the general was "directly and indirectly responsible for the deaths of millions of people".
Soleimani's killing marks a major escalation in tensions between Washington and Tehran.
Under his leadership, Iran had bolstered Hezbollah in Lebanon and other pro-Iranian militant groups, expanded its military presence in Iraq and Syria and orchestrated Syria's offensive against rebel groups in the country's long civil war.
Iran's Supreme Leader Ayatollah Ali Khamenei said "severe revenge awaits the criminals" behind the attack. He also announced three days of national mourning.
Soleimani was widely seen as the second most powerful figure in Iran, behind the Ayatollah Khamenei. The Quds Force, an elite unit of the Iranian Revolutionary Guards, reported directly to the ayatollah and Soleimani was hailed as a heroic national figure.
But the US has called the commander and the Quds Force terrorists and holds them responsible for the deaths of hundreds of US personnel.
President Trump, who was in Florida at the time of the strike, tweeted an image of the American flag shortly after the news broke.
Tweeting again on Friday, Mr Trump said Soleimani had "killed or badly wounded thousands of Americans... and was plotting to kill many more" and "should have been taken out many years ago".
"While Iran will never be able to properly admit it, Soleimani was both hated and feared within the country," he said.
A statement from the Pentagon - the headquarters of the US Department of Defense - said Soleimani had been "developing plans to attack American diplomats and service members in Iraq and throughout the region".
"This strike was aimed at deterring future Iranian attack plans," it added.
Meanwhile, global oil prices have soared by more than 4% in the wake of the attack.
How did the strike take place and who was killed?
Soleimani and officials from Iran-backed militias were leaving Baghdad airport in two cars when they were hit by a US drone strike near a cargo area.
The commander had reportedly flown in from Lebanon or Syria. Several missiles struck the convoy and at least seven people are believed to have died.
Iran's Revolutionary Guards said Iraqi militia leader Abu Mahdi al-Muhandis was among those killed.
Muhandis commanded the Iranian-backed Kataib Hezbollah group, which Washington blamed for a rocket attack which killed a US civilian contractor in northern Iraq last Friday.
He also effectively led the Popular Mobilisation units (PM), an umbrella of militias in Iraq dominated by groups aligned with Iran. Most of those killed in the strike belonged to the PM, the organisation said. Soleimani's son-in-law and a member of the Lebanese Hezbollah were also among the dead, it added.
The Pentagon statement said: "At the direction of the president, the US military has taken decisive defensive action to protect US personnel abroad by killing Qasem Soleimani."
It added: "The United States will continue to take all necessary action to protect our people and our interests wherever they are around the world."
The drone strike comes days after protesters attacked the US embassy in Baghdad, clashing with US forces at the scene. The Pentagon said Soleimani approved the attacks on the embassy.
Iran's most powerful military figure was regarded as the strategic mastermind behind its vast ambition in the Middle East and the country's real foreign minister when it came to matters of war and peace.
As commander of elite special forces, he orchestrated covert operations, involving a web of proxy militias, across the region. He also commanded political influence inside Iran and was regarded as second only to Iran's all-powerful Supreme Leader.
He was widely considered the architect of President Bashar al-Assad's war in Syria, the ongoing conflict in Iraq, the fight against Islamic State, and many battles beyond.
The silver-haired general with a close-cropped beard was a cult hero for his fighters and the face of evil for his foes. For years, US officials considered killing a cunning adversary who ordered attacks on their forces and taunted them with social media barbs.
At times some of their aims were aligned, including in the fight against Islamic State, but they remained sworn enemies.
Iranian officials are categorical - this is an act of war to be met by "harsh retaliation". Iran has many ways and means to strike back as a long-simmering crisis suddenly moves to a new, dangerous chapter.
How has Iran responded?
Foreign Minister Javad Zarif called the attack an "act of international terrorism", tweeting that the US "bears responsibility for all consequences of its rogue adventurism".
Allow Twitter content?
President Hassan Rouhani said in a statement: "Iran and the other free nations of the region will take revenge for this gruesome crime from criminal America."
His death, Mr Rouhani added, had redoubled Iran's determination "to stand against America's bullying".
Gen Esmail Qaani, deputy head of the Revolutionary Guards' foreign operations arm, was named as Soleimani's successor by Ayatollah Khamenei.
In other reaction:
- Iraq's Prime Minister Adel Abdul Mahdi condemned the "assassination" of Soleimani as a "dangerous escalation" of regional tensions
- Russia said the attack was a "murder" and a "reckless step" by the US
- Lebanon's Iran-backed Hezbollah group called for Soleimani's death to be avenged
- Israel's Prime Minister Benjamin Netanyahu said the US had the "right " to defend itself and praised President Trump for acting "swiftly, forcefully and decisively"
In Washington, members of President Trump's Republican Party welcomed the news. Top House Republican Kevin McCarthy said the strike had been a "display of resolve and strength".
But Democrats were critical. House Speaker Nancy Pelosi said the move risked "dangerous escalation" and suggested Congress should have been consulted.
Later on Friday, Secretary of State Mike Pompeo said the strike was "lawful" and "saved lives". He told Fox News: "We do not seek war with Iran but we will not stand by and see American lives put at risk."
Who was Qasem Soleimani?
From 1998, he led Iran's Quds Force which handles clandestine operations abroad.
Iran has acknowledged the role of the Quds Force in the conflicts in Syria, where it has advised forces supporting President Bashar al-Assad and armed thousands of Shia Muslim militiamen fighting alongside them, and in Iraq, where it has backed a Shia-dominated paramilitary force that helped tackle IS.
These conflicts turned the once-reclusive Soleimani into a something of celebrity in Iran.
The Trump administration has alleged that the Quds Force is "Iran's primary mechanism for cultivating and supporting" US-designated terrorist groups across the Middle East - including Lebanon's Hezbollah movement and Palestinian Islamic Jihad - by providing funding, training, weapons and equipment.
The US designated Iran's Revolutionary Guards and its Quds Force as foreign terrorist organisations in April.