The Pentagon has confirmed it killed Qassem Soleimani, Iran’s most powerful general in Iraq, on the orders of Donald Trump.

Within an hour of news breaking that Soleimani, the head of the elite Revolutionary Guard’s Quds Force, had been killed in an airstrike at Baghdad Airport, the US said it had carried out the operation and claimed it acted to “deter future Iranian attack plans”.

“At the direction of the president, the US military has taken decisive defensive action to protect US personnel abroad by killing Qassem Soleimani,” a Pentagon statement said.

It claimed that Soleimani, 62, who was the architect of Tehran's proxy wars in the Middle East, had “orchestrated” attacks on coalition bases in Iraq over the past few months and “approved the attacks” on the US embassy in Baghdad earlier this week.

President Trump, who is currently at his Florida estate at Mar-a-Lago, did not immediately comment but tweeted an image of a US flag. The White House, meanwhile, shared the Pentagon's statement.

The Islamic Republic of Iran 40 years on Show all 20 1 /20 The Islamic Republic of Iran 40 years on The Islamic Republic of Iran 40 years on Women praying during Ashura festivities in Yazd in February Jan Schneider The Islamic Republic of Iran 40 years on Cars cemented in at the Holy Defence Museum-Garden in Khorramshahr – in 1980 occupying Iraqi forces used such formations to deter paratrooper landings Jan Schneider The Islamic Republic of Iran 40 years on Women on the Si-o-se-pol bridge over the Zayanderude river in Esfahan Jan Schneider The Islamic Republic of Iran 40 years on Iranian tourists at Vank cathedral in the Armenian quarter in the city of Esfahan Jan Schneider The Islamic Republic of Iran 40 years on A reddened fountain in Yazd – a national motif recalling the countries ‘martyrs’ Pictures by Jan Schneider The Islamic Republic of Iran 40 years on Prayers before a list naming the fallen of the Iran-Iraq war in Tehran Jan Schneider The Islamic Republic of Iran 40 years on In a museum in central Tehran, a wax figure of Ayatollah Khomeini Jan Schneider The Islamic Republic of Iran 40 years on Carom billiards in Tehran Jan Schneider The Islamic Republic of Iran 40 years on Nearly two thirds of Iran’s population is under-30 Jan Schneider The Islamic Republic of Iran 40 years on Sanctions are exacerbating poverty Jan Schneider The Islamic Republic of Iran 40 years on Young people are adept at catching moments of freedom, such as this one in the capital Jan Schneider The Islamic Republic of Iran 40 years on At an art auction in Tehran, the wealthy turn out Jan Schneider The Islamic Republic of Iran 40 years on Propaganda murals are everywhere Jan Schneider The Islamic Republic of Iran 40 years on Tehranis love their outdoor spaces too Jan Schneider The Islamic Republic of Iran 40 years on The hypersaline waters of Lake Urmia are fast diminishing – Iran faces ecological catastrophe Jan Schneider The Islamic Republic of Iran 40 years on A martyr is depicted outside the huge Beheshte-e-Zahra cemetery in Tehran Jan Schneider The Islamic Republic of Iran 40 years on A guard naps outside Iran’s foremost tourist attraction – the ancient ruins of Persepolis Jan Schneider The Islamic Republic of Iran 40 years on Memorial to Iranian pilgrims who died during a stampede in Mecca 1987 Jan Schneider The Islamic Republic of Iran 40 years on The martyr fixation on display in the southern city of Shush Jan Schneider The Islamic Republic of Iran 40 years on Emamzadeh Saleh mosque in Shemiran, Tehran Jan Schneider

Mike Pompeo, the Secretary of State, shared a video he said was of "Iraqis dancing in the street for freedom; thankful that General Soleimani is no more."

Kayleigh McEnany, Trump’s re-election campaign press secretary, went one step further calling the assassination the “greatest foreign policy accomplishment of the decade, if not our lifetime”.

The strike, which follows a worsening of relations between the US and Iran since Mr Trump withdrew Washington from the multi-party nuclear deal, will likely complicate an already complex and fragile situation in the region, where the US has allied with Saudi Arabia, Israel and others to counter what it considers aggression from Tehran.

Iran, whose economy has been pounded by the impact of US sanctions, has responded by saying the US is seeking to replace its government.

Protesters gather outside the US embassy in Iraq

Soleimani was Iran's most recognisable and feared field commander and rose to prominence in the wake of the 2003 US-led invasion of Iraq. He was responsible for fighters in Syria shoring up support for President Bashar Assad against the rebels and Isis. He was also responsible for the deaths of American troops in Iraq.

He survived several assassination attempts against him by Western, Israeli and Arab agencies over the past two decades.​

Iranian President Hassan Rouhani vowed to avenge the killing.

"Soleimani's martyrdom will make Iran more decisive to resist America's expansionism and to defend our Islamic values. With no doubt, Iran and other freedom-seeking countries in the region will take his revenge," he said in a statement.

Javad Zarif, Iran's foreign minister, lashed out at the strike warning Washington that it "bears responsibility for all consequences of its rogue adventurism".

"The US' act of international terrorism, targeting and assassinating General Soleimani—THE most effective force fighting Daesh (ISIS), Al Nusrah, Al Qaeda et al—is extremely dangerous and a foolish escalation. The US bears responsibility for all consequences of its rogue adventurism," he said on Twitter.

An adviser to Iran's President Hassan Rouhani also threatened retaliation from Tehran.

"Trump through his gamble has dragged the US into the most dangerous situation in the region," Hessameddin Ashena wrote on the social media app Telegram.

"Whoever put his foot beyond the red line should be ready to face its consequences."

As news spread of the killing of Soleimani, who was killed along with a senior commander of Iraq’s militia forces, Abu Mahdi al-Muhandis, his supporters vowed the act would not go without a response.

Mohsen Rezaei, a former commander of the Revolutionary Guards, said there would be “rigorous revenge against America” for the US’s actions.

“Martyr Lieutenant General Qassem Soleimani joined his martyred brothers, but we will take vigorous revenge on America,” Mr Rezaei, who is now the secretary of a powerful state body, said in a post on Twitter.

Al-Muhandis was deputy commander of Iran-backed militias in Iraq known as the Popular Mobilisation Forces (PMF). Iraqi officials reported five others were also killed, including the PMF's airport protocol officer, Mohammed Rida.

Ahmed al-Assadi, a PMF spokesman, blamed the US and Israel.

“The American and Israeli enemy is responsible for killing the mujahideen Abu Mahdi al-Muhandis and Qassem Soleimani,” he said.

Local militia commander Abu Muntathar al-Hussaini told Reuters that Soleimani and Al-Muhandis were riding in the same vehicle when it was "struck by two successive guided missiles launched from an American helicopter".

They were apparently 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," the local commander said.

Iraqi paramilitary groups had said earlier on Friday that projectiles had hit Baghdad International Airport's air cargo terminal, burning two vehicles, killing and injuring several people.