In cities across Iran, tens of thousands packed the streets to mourn Maj. Gen. Qassem Soleimani. Black-clad women and men beat their chests and clutched photos of him. A black flag went up on the golden dome of Imam Reza shrine in the city of Mashhad, one of the holiest sites of Shiite Islam.

Just a few weeks earlier, the streets were filled with protesters angry with their leaders over the flailing economy and the country’s international isolation.

But at least for now, Iran is united — in anger at the United States.

For years, it has been a divided nation led by aged revolutionaries determined to impose their will on a predominantly young population with no memory of the Shah, who was deposed in the 1979 Islamic Revolution, and with a thirst to live in a more normal nation integrated into the world.

Suddenly, with one targeted assassination, the nation rallied behind its leaders.

Young and old. Rich and poor. Hard-liner and reformer, Soleimani, Iran’s most powerful military leader, was almost universally admired and had near cult figure status. He was killed in Baghdad on Friday in a drone strike ordered by President Donald Trump.

Advertising

His image is plastered across Tehran, often with black drapes reading in Arabic “God is Great.” In some neighborhoods residents placed black mourning flags at their doors.

“Without doubt, the people of Iran will take revenge for this horrific criminal act,” tweeted the president, Hassan Rouhani, a leader who once advocated diplomacy and integration with the West.

In Iraq on Saturday, tens of thousands of pro-Iranian fighters marched through the capital, Baghdad, vowing to exact revenge on the United States at a funeral procession for two revered Iraqi military figures who were also killed in the attack on Soleimani.

And in Iran, politicians and ordinary people of all stripes voiced support for the vow by the supreme leader, Ayatollah Ali Khamenei, that “severe revenge awaits those criminals” who killed the general.

The assassination appears to have solidified the hard-liners’ grip on power, neutralizing at least for the moment those who had called for talks with the West, experts inside and outside of Iran said.

Iran’s relative moderates like Rouhani have been on the defensive since Trump withdrew from the 2015 nuclear deal and imposed an array of sanctions, contributing to Iran’s sharp economic decline.

Advertising

That reversal bolstered hard-line critics who said it discredited those who had accepted U.S. assurances. Moderates had nurtured fading hopes of renewed talks with Washington — possibly between the two presidents.

Any talk of outreach or liberalization seems more dangerous than it has in years and likely to fade from public debate for the time being.

“At least in the short term, this will create a rally to the flag; Soleimani was personally popular,” said Vali R. Nasr, a Middle East scholar and former dean of Johns Hopkins University’s School of Advanced International Studies. He predicted “an outpouring of emotion,” both organic and whipped up by the government.

As Soleimani’s body makes its way to three Iranian cities for a statelike funeral procession over the next few days, Iranians in large numbers are expected to attend and display their solidarity and defiance. This show of unity, however, could be short-lived.

Iran is giving Soleimani a combination of state and saint funeral. His body will make a pilgrimage to shrines in all the holy cities of Shia Islam from Samarra, Kadhimiya, Karbala and Najaf to Mashhad and Qom. On Monday the body will be at Tehran University where Khamenei will perform the prayer of the dead and then taken to burial in his hometown of Kerman on Tuesday.

The deep grievances that ignited protests against the government in November still remain in place: economic hardship, international isolation and social oppression. Some Iranian opposition supporters have praised the assassination and are in favor of Washington increasing its maximum pressure policy on Iran’s rulers.

Advertising

Just last month, mass anti-government protests shook Iran, showing deep discontent — which only grew with a brutal crackdown that killed as many as 1,000 people. Fury at the United States is now expected to deflect attention from the country’s economic suffering and the recent protests.

And the assassination may well provide Iran’s leaders with an excuse to intensify its repression of dissenters and critics.

Soleimani’s killing “was the worst thing that could happen to civic movements in Iran and Iraq,” said Amir Rashidi, an Iranian cybersecurity expert based in New York. “It means more pressure on people who are already being squeezed politically and economically.”

In just a few days, the conflict between the United States and Iran has escalated dramatically. A rocket attack on a military base in Iraq killed an American on Friday; the United States blamed it on an Iran-backed militia and carried out airstrikes Sunday that killed some two dozen militia fighters. On Tuesday, militias swarmed the U.S. embassy compound in Baghdad, breached the outer wall and set fire to some structures.

Soleimani led the Quds Force of the Revolutionary Guard, which conducts Iran’s foreign military operations. He commanded Iranian forces battling the Islamic State in Iraq and Syria. He also headed Iran’s role in arming, training and directing anti-ISIS Shiite militias; the U.S. attack that killed him also killed the powerful leader of Iran-backed militias in Iraq, Abu Mahdi al-Muhandis.

In addition, the general directed Iran’s involvement with forces like the Houthi rebels in Yemen, Hezbollah in Lebanon and others that are in conflict with the United States and its regional allies, Israel and Saudi Arabia. The United States had labeled him a terrorist since 2007 and imposed economic sanctions on him.

Advertising

But in Iran, the government built up his public image as the person keeping the country safe. He went from a commander in the shadows to a household name, regularly seen in news videos directing troops in battle, meeting with allied leaders.

Actress Bahareh Rahnama, one of Iran’s biggest celebrities who is typically outspoken for women’s rights and human rights, posted on her Instagram with nearly 4 million followers, a message of condolence for Iran in the aftermath of Soleimani’s killing.

“We are forgetful people, how soon we forget how close ISIS was to us and who defeated this monster,” Rahnama wrote on her Instagram page.

Mahmoud Dolatabadi, Iran’s most revered author alive, wrote in an Iranian newspaper that “Iran once again lost one of its most honorable children. I am mourning the loss of someone that I admired from afar.”

Sara Masoumi, a prominent reformist journalist, tweeted, “From this day on in the minds of Iranians, Trump is not the president who exited the nuclear deal or imposed sanctions. He is the president who killed General Soleimani. Prospects of any talks with the U.S. are below zero.”

“Qassem Soleimani has been seen as the public face of Iran’s regional policy,” said Sanam Vakil, a senior research fellow and leader of the Iran Forum at Chatham House, an international affairs institute based in London. “Since the fight against ISIS, you’ve seen this surge of support for him.”

Advertising

Ariane Tabatabai, an Iran analyst with the RAND Corp., said, “He was presented and was seen as the man standing between Iran and the fate that happened to Iraq,” invaded by the United States and then devastated by civil wars.

Soleimani was broadly thought of as a conservative, but he took care not to align himself with any political faction in Iran or take sides in domestic disputes, allowing him to be seen as above politics.

“He’s someone who had a depth and breadth of relationships within the Iranian system that allowed him to work with all key players,” Tabatabai said. She cited his close working relationship with Iran’s foreign minister, Mohammad Javad Zarif, who is seen as a moderate.

“Every major political actor within Iran, from reformist to hard-liners, is saying this is a great loss,” she said.

Iran announced a three-day funeral procession for Soleimani, to begin on Saturday in Baghdad and then move to the holy cities of Najaf and Karbala, in Iraq. The procession will continue in Tehran, where Ayatollah Khamenei will pray over the general’s body at Tehran University, and then it will go to his hometown, Kerman, for burial.

An enormous turnout is expected, and leaders of militant groups from across the region are expected to attend the services, several people with knowledge of the planning said.

Advertising

“Many Iranians, whether they like the regime or not, did consider Soleimani as a sort of national symbol,” said Raz Zimmt, an Iran specialist at the Institute for National Security Studies in Tel Aviv, and they see his assassination “as something that hurts national pride.”

Since Trump’s withdrawal from the nuclear deal, Iran has revived its nuclear program in stages, amid escalating conflicts with the United States. The European signers of the agreement promised to find a way to offset the effects of the sanctions, but so far have failed. Hints at renewed negotiations with Washington have gone nowhere.

“The moderates were already on life support” before the killing of Soleimani, Nasr said, and Iran will hold legislative elections next month. “I would guess the hard-liners are going to do very well. This kind of pressure on Iran, just like in any country, plays into the hands of the security forces.”