Iran’s supreme leader has wept over the coffin of a top general killed in a US air strike in Baghdad as mourners flooded the streets of Tehran demanding retaliation against America.

The funeral for Revolutionary Guard General Qassem Soleimani drew a crowd said by police to be in the millions in the Iranian capital, filling thoroughfares and side streets as far as the eye could see.

Although there was no independent estimate, aerial footage and Associated Press journalists suggested a turnout of at least a million.

Authorities later brought his remains and those of others to Iran’s holy city of Qom, turning out another massive crowd.

Iranian Supreme Leader Ayatollah Ali Khamenei, left, openly weeps as he leads a prayer over the coffin of General Qassem Soleimani
Ayatollah Ali Khamenei, left, weeps as he leads a prayer over the coffin of General Qassem Soleimani (Iran Press TV via AP)

It was an unprecedented honour for a man viewed by Iranians as a national hero for his work leading the Guard’s expeditionary Quds Force.

The US blames him for the killing of American troops in Iraq and accused him of plotting new attacks just before his death on Friday.

Gen Soleimani also led forces in Syria backing President Bashar Assad in a long war.

His death has already pushed Tehran to abandon the remaining limits of its 2015 nuclear deal with world powers as his successor and others vow to take revenge.

In Baghdad, the parliament has called for the expulsion of all American troops from Iraqi soil, something analysts fear could allow so-called Islamic State (IS) militants to mount a comeback.

Gen Soleimani’s daughter Zeinab directly threatened an attack on the US military in the Middle East while also warning President Donald Trump, whom she called “crazy”.

“The families of the American soldiers … will spend their days waiting for the death of their children,” she said to cheers.

Mourners attend a funeral ceremony for Iranian General Qassem Soleimani and his comrades in Tehran
Mourners attend a funeral ceremony for Gen Soleimani and his comrades in Tehran (Office of the Iranian Supreme Leader via AP)

Her language mirrored warnings by other Iranian officials who say an attack on US military interests in the Middle East looms.

Iranian state television and others online shared a video that showed Mr Trump’s American flag tweet following Gen Soleimani’s killing turn into a coffin.

Supreme Leader Ayatollah Ali Khamenei prayed over the coffins of Gen Soleimani and others at Tehran University after a brief mourning period at the capital’s famed Musalla mosque.

The mosque was where prayers were said over the body of Ayatollah Ruhollah Khomeini, the founder of the Islamic Republic, after his death in 1989.

Ayatollah Khamenei, who had a close relationship with Gen Soleimani and referred to him as a “living martyr”, broke down four times in tears while offering traditional Muslim prayers for the dead.

“Oh God, you took their spirits out of their bodies as they were rolling in their blood for you and were martyred in your way,” Ayatollah Khamenei said as the crowd wailed.

Gen Soleimani will be buried on Tuesday in his home town of Kerman.

His successor, Esmail Ghaani, stood near Ayatollah Khamenei’s side, as did President Hassan Rouhani and other leaders in the Islamic Republic.

Ayatollah Ali Khamenei, centre, leads a prayer over the coffins of General Qassem Soleimani and his comrades
Ayatollah Ali Khamenei, centre, leads a prayer over the coffins of Gen Soleimani and his comrades (Office of the Iranian Supreme Leader via AP)

While Iran recently faced nationwide protests over government-set petrol prices that reportedly led to the killing of more than 300 people, Gen Soleimani’s death has brought together people from across the country’s political spectrum, temporarily silencing that anger.

Demonstrators burned Israeli and US flags, carried a flag-draped US coffin or displayed effigies of Mr Trump.

Some described Mr Trump himself as a legitimate target.

Mr Ghaani made his own threat in an interview shown on Iranian state television.

“God the Almighty has promised to get his revenge, and God is the main avenger. Certainly actions will be taken,” he said.

Markets reacted to the tensions, sending international benchmark Brent crude above 70 dollars a barrel for some of the day and gold to a seven-year high.

The Middle East remains a crucial source of oil, and Iran in the past has threatened the Strait of Hormuz, the narrow mouth of the Persian Gulf through which 20% of all the world’s oil traded passes.

Mr Ghaani, a longtime Soleimani deputy, has now taken over as the head of the Revolutionary Guard’s Quds, or Jerusalem, Force, answerable only to Ayatollah Khamenei.

Army cadets attend a funeral ceremony for Iranian General Qassem Soleimani and his comrades
Army cadets attend a funeral ceremony for Gen Soleimani and his comrades (Ebrahim Noroozi/AP)

Mr Ghaani has been sanctioned by the US since 2012 for his work funding its operations around the world, including its work with proxies in Iraq, Lebanon and Yemen.

Those proxies are likely to be involved in any operation targeting US interests in the Middle East or elsewhere.

Already, the US embassy in Saudi Arabia warned Americans “of the heightened risk of missile and drone attacks”.

In Lebanon, the leader of the Iranian-backed militant group Hezbollah said Gen Soleimani’s killing made US military bases, warships and service members across the region fair game for attacks.

On the nuclear deal, Iran now says it will not observe the accord’s restrictions on fuel enrichment, on the size of its enriched uranium stockpile and on its research and development activities.

That is a much harsher step than they had planned to take before the attack.

German Chancellor Angela Merkel, French President Emmanuel Macron and British Prime Minister Boris Johnson have urged Iran to “withdraw all measures” not in line with the deal.

Iran insisted it remains open to negotiations with European partners over its nuclear programme.

And it did not back off from earlier promises that it would not seek a nuclear weapon.

However, the announcement represents the clearest nuclear proliferation threat yet made by Iran since Mr Trump unilaterally withdrew from the accord in 2018 and reimposed sanctions last year.

It further raises regional tensions, as Iran’s longtime foe Israel has promised never to allow Iran to produce an atomic bomb.