ISTANBUL — The working-class anger behind a week of unrest in Iran will pose an increasingly potent challenge to Tehran's ruling clerics as economic and social pressures mount, even if the current protests peter out, analysts said Wednesday.

The deadly unrest across the country highlights the predicament facing Iran's leaders: how to address the aspirations of an educated, consumer-oriented generation born after the 1979 Islamic revolution now struggling to find jobs and a bright future.

On Wednesday, tens of thousands of people marched in pro-government rallies called to counter the earlier demonstrations, which have left at least 20 people dead and hundreds under arrest. The pro-government marches, broadcast by Iranian state media, had the hallmarks of previous state-organized gatherings, with crowds waving Iranians flags and holding placards with slogans backing Iran's supreme leader, Ayatollah Ali Khamenei.

Maj. Gen. Mohammad Ali Jafari, the head of the country's powerful Revolutionary Guards, said the marches marked an end to the anti-government protests, which he referred to as "the sedition."

But the show of strength is unlikely to defuse the tensions underpinning the protests, which have centered in provincial areas that have long been a conservative stronghold.

Iran's population is young, with a median age of 31, and the economic tools used by Iran's rulers have not kept pace with the demands of this new generation. Iran's fiscal planning remains top-heavy, run by state-directed panels and old-style foundations linked to the ruling theocrats and the military guardians of the system, the Revolutionary Guard. While these elites benefit, the youth unemployment rate is 24 percent.

"The rebuke both from the urban poor and more religious cities in Iran should be a wake-up call" to the Iranian leadership, said Behnam Ben Taleblu, an Iran expert at the Foundation for Defense of Democracies in Washington.

In the past week, there were echoes of the mass demonstrations that flared in 2009 after reformist political candidates were defeated in disputed presidential election: women pulling off headscarves, fist-pumping crowds, chants against Khamenei.

But unlike that earlier, largely middle-class movement centered in Tehran, the recent demonstrations are drawing heavily upon lower-income youths in religious cities and rural towns. In some cases, protesters have attacked police stations and government buildings.

Their movement has so far lacked any apparent leadership and clear demands. The despair that seems to be motivating the protests spells trouble for a government seeking to persuade demonstrators to work within the system.

"They are average Iranians, and they are tired of the regime's attempts to either humble or ignore them," Taleblu said. "Elites should be worried that they have a diminishing social base for legitimacy."

Nader Hashemi, director of the Center for Middle East Studies at Denver University, said the tumultuous week may embolden reformers, even if President Hassan Rouhani is "in a very difficult position."

The reformists were crushed after the 2009 protests, which challenged the reelection of hard-line populist Mahmoud Ahmadinejad. But they threw their weight behind Rouhani in 2013 and 2017, and now enjoy government and even cabinet positions. Rouhani promised greater social and political openness, as well as a revived economy after years of international sanctions, but he has been unable to deliver much change in a nation where the ruling clerics must approve all major decisions.

"There is no leadership among these protests," Hashemi said of the week's unrest, and many of the established reformists are "shocked and confused" about how to respond.

But he said, "If there is going to be any negotiation to defuse this, it's going to be people of a more reformist orientation who can then make the claim to the hard-line establishment that the status quo is untenable — that we need to pursue more substantive, transformative policies, and meet the grievances of these protesters."

Iran's conservatives have long counted on rural constituencies as a bulwark against the middle-class city-dwellers, who represent the base of support for reformists.

The Revolutionary Guards in particular, whose leaders have entered politics, was historically popular in the provinces, where it has carried out infrastructure and employment projects. But that's also where corruption and mismanagement have run rampant, sparking discontent. In recent months, some provincial cities have also witnessed protests over lost savings and deposits in illicit credit institutions.

"These are people who probably voted for Ahmadinejad on populist slogans, who voted for Rouhani because they wanted to see political change," Hashemi said. "And now they're deeply angry and they've given up on everyone."

A senior Trump administration official said Wednesday that U.S. officials were surprised by the outbreak of the protests and how they have spread. The official agreed that the unrest is different from the protests in 2009 because the latest events are occurring outside Tehran and are fueled by working-class grievances that are economic in nature, not political.

"We're looking at something new, something we haven't seen in Iran since the Islamic Revolution," the official said, adding that the novelty of the protests is making it difficult for U.S. officials to predict where they will lead.

The protests have inspired a number of tweets by President Trump, expressing support for the demonstrators and condemning the "corrupt and brutal Iranian regime." On Wednesday, Iran's ambassador to the United Nations said "numerous, absurd tweets" from Trump and Vice President Pence were responsible for inciting violence.

In a letter to the U.N. Security Council and Secretary General António Guterres, Gholamali Khoshroo said the Trump administration had "crossed every limit in flouting rules and principles of international law governing the civilized conduct in the international relations."

In addition to the tweets, he cited the State Department's acknowledgment it was making its Farsi language accounts on Facebook and Twitter available through virtual private networks to circumvent government attempts to block access.

"The current U.S. administration, despite its recent empty statements, has continuously insulted the great Iranian nation and displayed open hostility towards Iranian people," Khoshroo wrote, citing Trump's travel ban on Iranian citizens.