ISTANBUL – Hundreds of thousands of Iranian mourners marched through Tehran on Monday for the funeral of Maj. Gen. Qasem Soleimani, a massive display of grief and solidarity after the country’s most powerful military commander was killed in a U.S. drone strike last week.

The funeral in Tehran, marked by calls for revenge, underscored the emotions unleashed by President Donald Trump’s decision to kill Soleimani in a Baghdad airstrike. The ceremony rivaled the one held after the passing of the Islamic republic’s founder, Ayatollah Ruhollah Khomeini, in 1989, analysts said.

The consequences of the strike have rippled across the region and Europe, where leaders urged restraint amid the spiraling conflict.

In Iraq, where 5,000 American troops are stationed to help fight the Islamic State, the targeted killing put the U.S. mission at risk. Iraqi lawmakers have urged their government to swiftly expel foreign forces, prompting Trump to threaten Iraq with sanctions.

Iraqi Prime Minister Adel Abdul Mahdi met with U.S. Ambassador Matthew Tueller in Baghdad on Monday to “stress the seriousness of the current situation and its possible repercussions,” a statement from his office said. “Iraq is making all possible efforts to prevent a slide into open war,” Abdul Mahdi said.

Chevron, a U.S.-based multinational oil company, said Monday that it was pulling expatriate staff and contractors out of northern Iraq “as a precautionary measure.” Several U.S. embassies in the region – including in Bahrain, Israel, Kuwait and Saudi Arabia – issued security alerts advising American citizens of potential attacks and heightened unrest.

In Tehran, where the government made public transportation free Monday, Iranians filled boulevards in the city center as they trudged alongside Soleimani’s flag-draped coffin to the iconic Freedom Square.

“No compromise, no surrender, in the battle against America!” they chanted.

Other mourners implored Supreme Leader Ayatollah Ali Khamenei to avenge the commander’s death.

Khamenei, who observers said rarely presides over the funerals of senior officials, openly wept as he prayed over Soleimani’s body in the capital. He was flanked by President Hassan Rouhani; Soleimani’s successor, Brig. Gen. Ismail Qaani; and other key security and political figures.

“We promise to continue down martyr Soleimani’s path as firmly as before with the help of God,” Qaani said in an interview with Iranian state television.

The bespectacled commander, who served as Soleimani’s deputy, was appointed as the head of the powerful Quds Force, the expeditionary wing of Iran’s Islamic Revolutionary Guard Corps tasked with spreading the country’s influence abroad.

“In return for his martyrdom, we aim at getting rid of America from the region,” Qaani said of his predecessor.

Soleimani was a talismanic figure and an engineer of Iran’s project of building loyal proxy forces across the Middle East, from Iraq to Lebanon to Syria and Yemen.

Analysts said the large crowds at Soleimani’s funeral in part reflected government coercion but were also an organic testament to the general’s popularity as “a patriotic hero . . . who safeguarded Iran’s national security and protected Iran from the threat of the Islamic State,” said Ali Fathollah-Nejad, a visiting fellow at the Brookings Doha Center in Qatar.

Iran’s government, he said, has “mastered the art of creating images that are destined for domestic consumption but more so for foreign consumption to display popular support for the regime.”

Soleimani was also portrayed “as someone who empowered Iran and elevated Iranian power in the region,” Fathollah-Nejad said, adding that the general was seen in Iran as someone who avoided corruption.

Even as some Iranians pushed for retaliation against the United States, a joint statement from Britain, France and Germany called on Iran to refrain from “further violent action.”

European nations have been reluctant to publicly condemn the United States for Soleimani’s killing, focusing instead on Iran, which they view as a core threat to their security interests.

Germany’s foreign minister, Heiko Maas, said in an interview with German public broadcaster Deutschlandfunk that Trump’s threats to impose sanctions on Iraq were “not very helpful at this point.”

The international community, he said, “has invested a lot, not only militarily but also in terms of support for stabilization.” Those efforts, Maas said, were at risk “of being lost if the situation continues to develop this way.”

Of particular concern to Europe, however, was Iran’s decision Sunday to suspend its commitments under the 2015 nuclear deal with world powers, including caps on uranium enrichment, advanced centrifuges and other activities.

Trump withdrew from the deal, which curbed Iran’s atomic-energy activities in exchange for widespread sanctions relief, in 2018 and reimposed harsh sanctions on a wide range of economic activity, including Iranian oil exports, banking transactions, and the civil aviation and automotive sectors.

Iran said Sunday that it would continue to cooperate with the International Atomic Energy Agency, the United Nations nuclear watchdog tasked with monitoring and inspecting Iran’s nuclear program. If U.S. sanctions were lifted, the government said, it would return to its obligations under the accord.

European diplomats took that as a sign that Tehran is still interested in extracting concessions rather than walking away from the deal altogether.

Diplomats said that the foreign ministers of European Union member nations would hold an emergency meeting in Brussels on Friday to discuss how to respond to the crisis, including whether Europe will start a process that could lead to the eventual reimposition of sanctions on Iran. Triggering that process would lead to months of negotiations.

“The risk of European sanctions is low,” Henry Rome, an Iran analyst at the political-risk firm Eurasia Group, said in a briefing note.

“Iran’s nuclear announcements [Sunday] were relatively mild,” he said. And they “will also reduce pressure on European countries to trigger the nuclear deal’s dispute resolution mechanism.”

“Iran has decided to violate much of its uranium commitments, although it is taking a cautious approach,” Rome said, adding that Iran appears to be continuing its commitments to the plutonium- and inspections-related parts of the deal.

– – –

Dadouch reported from Beirut and Birnbaum from Brussels. The Washington Post’s Liz Sly in Beirut and Paul Schemm in Dubai contributed to this report.

Aftermath of the killing of Iranian Gen. Qassem Soleimani