Thousands of mourners have marched in a funeral procession through Baghdad for Iran’s top general and Iraqi militant leaders, who were killed in a US air strike, chanting “Death to America”.

Gen Qassem Soleimani, the head of Iran’s elite Quds force and mastermind of its regional security strategy, was killed in an air strike early on Friday near the Iraqi capital’s international airport that has caused regional tensions to soar.

Iran has vowed harsh retaliation, raising fears of an all-out war.

US President Donald Trump says he ordered the strike to prevent a conflict. His administration says Soleimani was plotting a series of attacks that endangered American troops and officials, without providing evidence.

Washington has dispatched 3,000 troop reinforcements to the region.

Soleimani was the architect of Iran’s regional policy of mobilising militias across Iraq, Syria and Lebanon, including in the war against the Islamic State group.

He was also blamed for attacks on US troops and American allies going back to the 2003 invasion of Iraq.

The mourners, mostly men in black military fatigues, carried Iraqi flags and the flags of Iran-backed militias that are fiercely loyal to Soleimani.

They were also mourning Abu Mahdi al-Muhandis, a senior Iraqi militia commander who was killed in the same strike.

The procession began at the Imam Kadhim shrine in Baghdad, one of the most revered sites in Shiite Islam. Mourners marched in the streets alongside militia vehicles in a solemn procession.

Iran Soleimani
Vehicles drive past a billboard showing a portrait of Iranian Revolutionary Guard Gen Qassem Soleimani (Vahid Salemi/AP)

The mourners, many of them in tears, chanted: “No, No, America,” and “Death to America, death to Israel.”

Mohammed Fadl, a mourner dressed in black, said the funeral is an expression of loyalty to the slain leaders.

“It is a painful strike, but it will not shake us,” he said.

Two helicopters hovered over the procession, which was attended by Prime Minister Adel Abdul-Mahdi and leaders of Iran-backed militias.

The gates to Baghdad’s Green Zone, which houses government offices and foreign embassies, including the US Embassy, were closed.

As tensions soared across the region, there were reports overnight of an air strike on a convoy of Iran-backed militiamen north of Baghdad.

Hours later, the Iraqi army denied any air strike had taken place. The US-led coalition also denied carrying out any air strike.

Iraq Soleimani
Mourners gather for a funeral procession for Gen Qassem Soleimani (PMF Media Office via AP)

The Popular Mobilisation Forces, an umbrella group of mostly Iran-backed militias, and security officials had reported the air strike in Taji, north of the capital.

An Iraqi security official had said five people were killed and two vehicles were destroyed.

It was not immediately clear if another type of explosion had occurred.

The killing of Soleimani comes after months of rising tensions between the US and Iran stemming from Trump’s decision to withdraw from the 2015 nuclear deal and restore crippling sanctions.

The administration’s “maximum pressure” campaign has led Iran to openly abandon commitments under the deal.

The US has also blamed Iran for a wave of increasingly provocative attacks in the region, including the sabotage of oil tankers in the Persian Gulf and an attack on Saudi Arabia’s oil infrastructure in September that temporarily halved its production.

Iran denied involvement in those attacks, but admitted to shooting down a US surveillance drone in June that it said had strayed into its airspace.

Global powers had warned on Friday that the killing of Soleimani could spark a dangerous new escalation, with many calling for restraint.

Iran Soleimani
President Hassan Rouhani meets family of Iranian Revolutionary Guard Gen Qassem Soleimani (Iranian Presidency Office via AP)

Iranian President Hassan Rouhani, a relative moderate in the country’s political establishment, visited Soleimani’s home in Tehran to express his condolences.

“The Americans did not realise what a great mistake they made,” Mr Rouhani said.

“They will see the effects of this criminal act, not only today but for years to come.”