BAGHDAD (AP) — Thousands of mourners chanting “America is the Great Satan” marched in a funeral procession Saturday through Baghdad for Iran’s top general and Iraqi militant leaders, who were killed in a U.S. airstrike.

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

Iran has vowed harsh retaliation, raising fears of an all-out war. U.S. 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.

An official with the U.S.-led coalition in Iraq said it has scaled back operations and boosted “security and defensive measures” at bases hosting coalition forces in the country. The official spoke on condition of anonymity according to regulations.

ASSOCIATED PRESS Mourners step over a U.S. flags with pictures of President Donald Trump during the funeral procession for Iran's top general Qassem Soleimani.

Anadolu Agency via Getty Images

Washington has dispatched another 3,000 troops to neighboring Kuwait.

Soleimani was the architect of Iran’s regional policy of mobilizing militias across Iraq, Syria and Lebanon, including in the war against the Islamic State group. He was also blamed for attacks on U.S. 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.

picture alliance via Getty Images Mourners stand next to a giant portrait for Qassem Soleimani during a funeral procession.

ASSOCIATED PRESS Mourners march during the funeral of Iran's top general Qassem Soleimani, 62.

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.

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 procession later made its way to the Shiite holy city of Karbala, in central Iraq.

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

AHMAD AL-RUBAYE via Getty Images An Iraqi woman holds a placard during the funeral of Iranian military commander Qasem Soleimani.

SABAH ARAR via Getty Images Thousands of Iraqis chanting "Death to America" joined the funeral procession on Saturday.

Iraq, which is closely allied with both Washington and Tehran, condemned the airstrike that killed Soleimani and called it an attack on its national sovereignty. Parliament is to meet for an emergency session on Sunday, and the government has come under mounting pressure to expel the 5,200 American troops based in the country, who are there to help prevent a resurgence of the Islamic State group.

The U.S. has ordered all citizens to leave Iraq and closed its embassy in Baghdad, where Iran-backed militiamen and their supporters staged two days of violent protests earlier this week in which they breached the compound.

Britain and France also warned their citizens to avoid or strictly limit travel in Iraq.

No one was hurt in the embassy protests, which came in response to U.S. airstrikes that killed 25 Iran-backed militiamen in Iraq and Syria. The U.S. said the strikes were in response to a rocket attack that killed a U.S. contractor in northern Iraq, which Washington blamed on the militias.

ASSOCIATED PRESS Mourners step over a U.S. flag before burning it during the funeral of Iran's top general Qassem Soleimani.

Tensions between the U.S. and Iran have steadily intensified since 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 U.S. 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 U.S. surveillance drone in June that it said had strayed into its airspace.

On Saturday, billboards appeared on major streets in Iran showing Soleimani and carrying the warning from Supreme Leader Ayatollah Ali Khamenei that “harsh revenge” awaits the US.

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

Iranian state television also aired images of a ceremony honoring Soleimani at a mosque in the Shiite holy city of Qom, where a red flag was unfurled above the minarets. Red flags in Shiite tradition symbolize both blood spilled unjustly and serve as a call to avenge a person who is slain.

Iranian President Hassan Rouhani visited Soleimani’s home in Tehran to express his condolences.

“The Americans did not realize what a great mistake they made,” Rouhani said. “They will see the effects of this criminal act, not only today but for years to come.”

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

Iran’s state TV reported that Qatar’s foreign minister, Sheikh Mohammed bin Abdulrahman Al Thani, made an unplanned trip to Iran where he met with his counterpart, Foreign Minister Mohammad Javad Zarif. The Qatari diplomat was also set to meet with Rouhani.

picture alliance via Getty Images On Saturday, billboards appeared on major streets in Iran showing Soleimani’s face, many carrying the warning from Supreme Leader Ayatollah Ali Khamenei that “harsh revenge” awaits the US.

Qatar hosts American forces at the Al-Udeid Air Base and shares a massive offshore oil and gas field with Tehran. It has often served as a regional mediator.

Adel al-Jubeir, the Saudi minister of state for foreign affairs, took to Twitter to reiterate the kingdom’s call for “self-restraint” to avoid “unbearable consequences.”

Another Saudi official confirmed to The Associated Press that the U.S. did not give a heads-up to Saudi Arabia or its other Gulf allies before carrying out the strike that killed Soleimani. The official was not authorized to discuss security matters and so spoke on condition of anonymity.

Italy’s Foreign Minister meanwhile condemned the strike that killed Soleimani, in a rare criticism of the U.S. strike from a Western ally.

In a Facebook post, Luigi Di Maio said the use of violence threatens to bring “destabilization and devastating humanitarian and migratory effects.”

Thaier Al-Sudani / Reuters Global powers had warned Friday that the killing of Soleimani could spark a dangerous new escalation, with many calling for restraint

Italy has long been one of Iran’s biggest trading partners in the European Union, and it has more than 800 regular soldiers and some 80 special forces in Iraq.

Illustrating Soleimani’s regional reach, Palestinian factions in the Gaza Strip, including the territory’s Hamas rulers, opened a mourning site for the slain general and dozens gathered to burn American and Israeli flags.

Ismail Radwan, a senior Hamas official, said the killing of Soleimani was “a loss for Palestine and the resistance.” Iran has long provided aid to the armed wing of Hamas and to the smaller Islamic Jihad militant group.

___

El Deeb reported from Beirut. Associated Press writers Joseph Krauss in Jerusalem, Jon Gambrell and Aya Batrawy in Dubai, United Arab Emirates; Amir Vahdat in Tehran, Iran, Zeina Karam in Beirut and Fares Akram in Gaza City, Gaza Strip contributed.