TEHRAN (AFP) -- Iran's supreme leader fought back tears as a sea of black-clad mourners paid homage Monday to the top commander assassinated in a US drone strike last week that has inflamed tensions across the Middle East.
In a surprise move in Baghdad where the strike was carried out, the US military informed its Iraqi counterparts that it was preparing for "movement out of Iraq".
Ayatollah Ali Khamenei choked up as he prayed over the remains of Qasem Soleimani, the slain head of the Revolutionary Guards' Quds Force, at Tehran University.
The targeted killing of 62-year-old Soleimani ordered by US President Donald Trump saw Iran vow "severe revenge" before it also took a further step back from the already tattered 2015 nuclear accord with world powers.
In an escalating war of words that has heightened international concern and rattled financial markets, Trump threatened yet more "major retaliation" if Tehran hits back, including strikes on Iranian cultural sites.
Writing in all-caps on Monday, Trump tweeted: "IRAN WILL NEVER HAVE A NUCLEAR WEAPON!"
Iraq's parliament has demanded the government expel the 5,200 American troops stationed in the country in response to the drone attack which also killed top Iraqi military figure Abu Mahdi al-Muhandis.
The head of the US military's Task Force Iraq, Brigadier General William Seely, on Monday sent a letter to the head of Iraq's joint operations command, a copy of which was seen by AFP.
The letter said forces from the US-led coalition in Iraq would "be repositioning forces over the course of the coming days and weeks to prepare for onward movement".
"Coalition Forces are required to take certain measures to ensure that the movement out of Iraq is conducted in a safe and efficient manner," said the letter.
'Path of sobriety'
NATO chief Jens Stoltenberg warned Iran must avoid "further violence and provocations" after the alliance held emergency talks in Brussels on the crisis.
"At our meeting today, allies called for restraint and de-escalation. A new conflict would be in no-one's interest," he said.
The European Union, whose foreign ministers will hold emergency talks on the crisis Friday, said it was in both Iran and Iraq's interests to "take the path of sobriety and not the path of escalation".
France's foreign minister urged Tehran not to retaliate.
"It is essential that Iran renounce any reprisals or retaliations," Jean-Yves Le Drian told BFM television, adding that "there is still a place for diplomacy, fortunately".
Saudi Arabia -- an oil-rich US ally seen as vulnerable to Iranian counter strikes -- also appealed for calm after a "very dangerous" escalation.
The EU's diplomatic chief Josep Borrell said he "deeply regrets" Iran's latest step back from the nuclear deal.
The agreement had offered Tehran relief from sanctions in return for curbs to prevent it acquiring nuclear weapons -- but Trump's withdrawal from it in 2018 dramatically weakened the agreement.
Despite its latest step, Iran insisted it will continue to fully cooperate with the UN agency overseeing its atomic programme.
Amid the geopolitical tensions in the oil-rich region, crude prices surged and most equities tumbled while the safe-haven commodity gold hit a more than six-year high.
The raw emotions sparked by the killing of Soleimani were on full display in Tehran, where mourners formed a sea of black, dotted with red Shiite flags and white signs, in what state television said was a "several million-strong" turnout.
"The last time I remember such a crowd was at Ayatollah Khomeini's funeral 30 years ago," said journalist Maziar Khosravi.
As they marched down a main artery of the Iranian capital, the mourners chanted "Death to America" and "Death to Israel".
Khamenei's voice cracked and he appeared to weep briefly as he prayed over the flag-draped coffins containing the remains of Soleimani and five other "martyrs" killed in the strike.
The supreme leader was flanked by President Hassan Rouhani and other top political and military figures as well as the slain general's replacement as Quds commander, Esmail Qaani.
In a Tweet on Monday, Rouhani warned Trump to "never threaten the Iranian nation", after the US president on Saturday issued a US strike list of 52 targets in the Islamic republic.
"Those who refer to the number 52 should also remember the number 290.
#IR655 Never threaten the Iranian nation," he tweeted, referring to 290 lives lost in July 1988 when a US warship shot down an Iran Air plane in the Gulf.
Trump said his figure of 52 targets represented the number of Americans held hostage at the US embassy in Tehran for more than a year starting in late 1979.
Homage in Qom
The funeral procession made its way to Tehran's Azadi Square, before Soleimani's remains were flown to the holy city of Qom for a ceremony.
A tribute was also paid to Soleimani and Muhandis at a mosque in Baghdad where people trampled on a large portrait of Trump and the US and Israeli flags.
In Yemen, hundreds vented their anger over the assassination in a protest called by Tehran-backed Huthi rebels.
Soleimani was one of Iran's most popular public figures, seen as a hero of the 1980-88 Iran-Iraq war.
The general will be laid to rest in his hometown Kerman on Tuesday, in a martyrs' cemetery next to a war veteran he used to fight alongside with. (AFP)