Updated

The protesters rallied for days in Iran, chanting against government corruption and demanding justice.

That was last year, when depositors who lost their savings in the collapse of major government-run credit union took to the streets, shouting "Death to (Valiullah) Seif," Iran's Central Bank governor.

In the past 10 days, there were new protests, the largest in Iran since its 2009 disputed presidential election, fueled by young people angry over their bleak prospects. This time, they shouted slogans against President Hassan Rouhani and Supreme Leader Ayatollah Ali Khamenei, a figure seen as subordinate only to God by hard-liners.

The new unrest appears to be waning, but anger over the economy persists. The protests in dozens of towns and cities also showed that a sector of the public was willing to openly call for the removal of Iran's system of rule by clerics — frustrated not just by the economy but also by concern over Iran's foreign wars and general direction.

That sentiment likely extends beyond those who took to the streets. But the protests also showed the constraints on discontent. Fear of reprisals probably kept some people away from the protests, but so did worry over chaos that might result from unrest and hope that gains could still be made within the system.

Without drastic change in people's livelihoods, unrest over the economy will only intensify, becoming perhaps the greatest challenge for the Islamic Republic as it nears its fourth decade of existence and a new era of leadership looms.

___

ECONOMIC WOES

The collapse last year of the Caspian Credit Institute, which promised depositors returns often seen in Ponzi schemes, showed the economic desperation faced by many in Iran. Retirees unable to make ends meet on their pensions can be found driving many of the taxis crowding Tehran's roads. Universities turn out students with no hope of employment in their fields, while those lucky enough to have work often have a second or even a third job.

Banks remain saddled with bad loans, a warning repeatedly sounded by the International Monetary Fund. Some of this stretches back to the days of nuclear sanctions, while others find themselves mired in the murky finances of the paramilitary Revolutionary Guard, which is estimated to control a third of the total economy.

Inflation, initially brought under control by Rouhani, has slipped back into double digits, according to recent figures. He cut some subsidies offered by his hard-line predecessor, the Holocaust-questioning populist Mahmoud Ahmadinejad. Those subsidies benefited rural and poor voters in the provinces, the same people who appear to have taken to the streets in the recent protests, initially sparked by food prices.

The government likely will offer either subsidized food prices or new cash handouts to soothe anger in the provinces, although how that comes about remains to be seen. But the unrest has had one benefit: it has helped boost global oil prices to over $60 a barrel, providing desperately needed hard currency to the OPEC-member nation.

___

BATTLEFIELD SUCCESS

The recent protests saw some marchers chant against Iran's foreign wars, demanding the government focus first on those at home.

Since the U.S.-led invasion of Iraq in 2003, Iran has expanded its presence across the Middle East as a counter to the American bases that dot the Arab Gulf countries surrounding it. The U.S. military accused Iran of training insurgents in Iraq who targeted its troops with roadside bombs, and Tehran has powerful influence over Iraq's Shiite-led government.

The rise of the Islamic State group, as well as the Syrian civil war, threatened Iran's allies, and it responded by sending the Revolutionary Guard's elite Quds expeditionary force into both Iraq and Syria.

In Iraq, Iranian advisers turned Shiite militias into a powerful ground force against IS extremists.

In Syria, President Bashar Assad appeared to be on the ropes until Iran fully entered the conflict. He held onto his presidency with Quds force generals leading foreign fighters from Afghanistan and Pakistan, as well Iranian-supported Hezbollah guerrillas from Lebanon.

In Yemen, the United States and other Western powers accused Tehran of supplying Shiite rebels with ballistic missile technology.

Protesters denounced the money going to support these groups rather than helping people in Iran.

But the success abroad also is used by the state to drum up support. Revolutionary Guard Gen. Qassem Soleimani has been elevated to a folk hero among some Iranians. An assault in June by the Islamic State group targeting Tehran — a rare terror attack in the Iranian capital — also galvanized support by the public, which fears a return of the bombings and unrest that immediately followed the 1979 Islamic Revolution. Iranians also see the aftermath of wars in the region as serving to protect the Islamic Republic's Shiite-dominated government.

___

NEW ERA LOOMS

Approaching the 40th anniversary of the revolution, Iran will increasingly consider who will follow the 78-year-old Khamenei, who underwent prostate surgery in 2014. Among those under consideration is Rouhani, himself a cleric. Both the U.S. and analysts studying Iran say hard-liners initially fomented the economic protests to put pressure on Rouhani but quickly lost control of them.

Iranian law bars Rouhani from seeking a third term, so Iran's 2021 presidential election will see a wide-open field. Hard-liners at one point called for an earlier presidential election, saying Rouhani's policies had failed, although that bid went nowhere.

The economic resentment seen in recent days could prompt the rise of another Ahmadinejad-style hard-line populist — if Iran's clerical leadership allows such a candidacy.

It's hard to tell right now who emerged stronger after the protests — Rouhani or his hard-line opponents.

Each tried to wield anger over the economy against the other. Weeks before the protests, Rouhani publicly complained that large parts of the government budget went to religious institutions, largely seen as power bases of the hard-liners, seeking to deflect blame over the economy. From the other side, it is widely believed that the hard-liners were the ones who initially stoked the protests to embarrass Rouhani, only to see the demonstrations turn against the entire ruling establishment.

___

PROTESTS WANE, ANGER REMAINS

Authorities managed to stifle the protests in part by blocking access to the messaging app Telegram through which demonstrators organized the rallies and shared images from the streets. The Revolutionary Guard's volunteer Basij force also was deployed and police have arrested hundreds; more than 20 protesters were killed, although security forces did not engage in the level of bloodshed that followed the 2009 protests.

Both President Donald Trump and Israeli Prime Minister Benjamin Netanyahu said they supported the protesters, without apparently providing any aid. The protests quickly raised the hopes of those abroad who want to see an end to the Islamic Republic.

But for now, that won't be happening. Instead, Iran's ruling system faces a future of grappling with the effects of economic woes that have proven to be unpredictable and potentially volatile.

___

EDITOR'S NOTE — Jon Gambrell, an Associated Press reporter since 2006, has covered the Middle East from Cairo and Dubai, United Arab Emirates, since 2013. Follow him on Twitter at www.twitter.com/jongambrellap . His work can be found at http://apne.ws/2galNpz .