General Qassim Soleimani, the head of Iran's elite Quds Force, was killed in an airstrike by the US at Baghdad's international airport Friday, Iraqi television and officials said.
The strike also killed Abu Mahdi al-Muhandis, the deputy commander of Iran-backed militias known as the Popular Mobilization Forces, or PMF, the officials said.
Their deaths are a potential turning point in the Middle East and are expected to draw severe retaliation from Iran and the forces it backs in the Middle East against Israel and American interests.
Iran's supreme leader, Khamenei, warned that "a harsh retaliation is waiting'". He declared three days of mourning for Soleimani.
"Martyrdom was the reward for his ceaseless efforts in all these years," Khamenei said on his Farsi-language Twitter account in reference to Soleimani.
Guards ex-head vowed 'revenge' on the US over Soleimani's death.
"Soleimani joined his martyr brothers but we will exact terrible vengeance upon America," Mohsen Rezai, who currently heads the Expediency Council, wrote on Twitter.
Iran Foreign Minister Javad Zarif said: "The US' act of international terrorism, assassinating General Soleimani—the most effective force fighting Daesh (ISIS), Al Nusrah, Al Qaeda, is extremely dangerous and foolish escalation. The US bears responsibility for all consequences of rogue adventurism."
The PMF blamed the United States for an attack at Baghdad International Airport Friday.
The US said General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region.
A senior Iraqi politician and a high-level security official confirmed to the Associated Press that Soleimani and al-Muhandis were among those killed in the attack.
Two militia leaders loyal to Iran also confirmed the deaths, including an official with the Kataeb Hezbollah, which was involved in the attack on the US Embassy this week.
The official, speaking on condition of anonymity, said al-Muhandis had arrived to the airport in a convoy to receive Soleimani whose plane had arrived from either Lebanon or Syria. The airstrike occurred as soon as he descended from the plane to be greeted by al-Muhandis and his companions, killing them all.
The officials spoke on condition of anonymity because of the sensitivity of the subject and because they were not authorized to give official statements.
The senior politician said Soleimani's body was identified by the ring he wore.
Soleimani had been rumoured dead several times, including in a 2006 airplane crash that killed other military officials in northwestern Iran and following a 2012 bombing in Damascus that killed top aides of embattled Syrian President Bashar Assad.
More recently, rumours circulated in November 2015 that Soleimani was killed or seriously wounded leading forces loyal to Assad as they fought around Syria's Aleppo.
Earlier, Iraq's Security Media Cell, which releases information regarding Iraqi security, said Katyusha rockets landed near the airport's cargo hall, killing several people and setting two cars on fire.
(With agency inputs)