ISTANBUL — A sudden move to raise fuel prices in Iran has sparked nationwide protests over the past week and, in turn, drawn a fierce crackdown by security forces, marking some of the worst violence in the country in years. Scores have been reported killed.

The protests have flared in many of the same areas that experienced unrest two years ago, when demonstrators protested a similar proposal to slash state subsidies. Then, as now, ­lower-income Iranians rose up against a system they said had failed them economically.

But a wider spectrum of society may have joined the revolt this time around, analysts say, pointing to demonstrations in major cities and at universities, including the University of Tehran. Protesters have also clashed with police in urban centers such as Isfahan, Mashhad, Shiraz and Tabriz.

Over the past two years, Iran’s economy has worsened because of U.S. sanctions and declining oil sales — revenue the government uses to pay salaries and fund imports. Iran’s economy is expected to contract by 8.7 percent this year, according to the World Bank.

The soaring inflation and stagnating wages have deepened Iranians’ malaise and frustration. But the dismal state of affairs also appears to have lit a fire.

In recent days, demonstrators angered by the fuel price hike have confronted security forces in at least 100 locations, surpassing the previous protests in ferocity and geographic scale. They burned banks and police stations, ransacked government buildings and blocked roads. Riot police responded with tear gas, water cannons and live fire, rights groups said. More than 100 demonstrators may have been killed, according to Amnesty International.

“The common thread between the 2017-2018 protests and those taking place today is the sense among many Iranians that the economy favors entrenched interests and that much of the nation’s wealth is not being spent on its people,” said Esfandyar Batmanghelidj, founder of Bourse & Bazaar, a website featuring economic analysis on Iran. “Iranian taxpayers are rightly wondering why they need to bear the brunt of fiscal reforms when entrenched interests continue to benefit from state funds while putting nothing back into the coffers.”

Many of Iran’s state-owned enterprises — including those affiliated with Ayatollah Ali Khamenei, Iran’s supreme leader, and the Revolutionary Guard Corps, a powerful security branch — are exempt from paying taxes. Iranians have balked at the money they say is spent funding Iran’s military operations abroad.

“The people’s rage is escalating. They feel like the government treats them like children and no one is willing to stand up to protect them,” said Davoud, 36, an architect in the northeastern city of Mashhad. Davoud, who was reached by telephone, declined to provide his full name for fear of reprisal by security forces.

“They didn’t even bother to mentally prepare the public before the decision,” he said of the government’s botched rollout of the subsidy-cut plan, noting that fuel prices jumped by 50 percent overnight.

In Mashhad, he said, the effects were immediate. The turmoil caused a cooking gas shortage, and farmers began limiting trips to the city because the cost of fuel was too high.

In Tehran, residents reported a sharp increase in bread prices.

“The real impact of all of this is still on its way,” said Sara, 30, a marketing specialist in Tehran. She also declined to provide her full name for fear of reprisal by the government.

“I could already visibly see the decline in people’s standard of living, on the buses and on the subway,” she said. “I cannot fathom what might happen next.”

Despite the widespread protests, the government has doubled down on its decision to raise fuel prices, saying extra money is needed to finance cash handouts to the poor. A looming budget deficit has also hastened the state’s search for new revenue streams as it grapples with lost oil income amid U.S. trade restrictions, economists say.

Before U.S. sanctions were reimposed last year after the Trump administration pulled the United States out of the 2015 nuclear deal with Iran, Tehran was exporting roughly 2 million barrels of oil per day. In October it exported just 500,000 barrels per day, according to S&P Global Platts, a market intelligence firm.

Iran plans to exclude all oil revenue from its budget for fiscal 2020, local news agencies reported this month. It also might raise taxes, issue debt and sell off more state-owned entities, said Henry Rome, a Middle East analyst at the New York-based Eurasia Group, a political risk consulting firm.

“None of these options is a silver bullet,” Rome said.

But the battle over Iran’s budget, including tough austerity measures, has widened into a larger fight over the state’s legitimacy. Protesters have burned and defaced state symbols, including images of Khamenei, and chanted anti-government slogans.

“Iran is essentially a welfare state. In return for supplying Iranians with cheap energy, food and welfare, the government has taken over the economy. It is the grocery store, the gas station, the hospital, the airline, the bakery,” said Ali Dadpay, an associate professor of finance and expert on Iran’s economy at the University of Dallas.

“So, when the government reduces subsidies or cuts the budget, it upsets many who have been denied any other alternative,” he said. “I am not sure if the government understands the depths of Iranians’ frustration or the damage the widespread corruption is causing Iran’s economy. There is little incentive for it to become more proactive in addressing public concerns or complaints.”

Indeed, as protests raged over the past week, the government ordered sweeping restrictions to Internet access and launched a brutal campaign to quash the unrest.

 On Thursday, local news agencies reported a gradual return of Internet services to some parts of the country. NetBlocks, a civil society group monitoring worldwide Internet access, said on Twitter that real-time data confirmed the partial restoration of Internet connectivity in Iran.

“I think the Iranian leadership made the brutal calculation that imposing the policy rapidly and by the barrel of a gun would reduce the risk that sustained public pressure could force the government to back down,” Rome said.

But the damage, including to people’s livelihoods, may have already been done.

Maryam, 31, said she registered to take the online version of the Graduate Record Examinations, a standardized test required for admission to some graduate schools in the United States, on Nov. 20. But because of the Internet blackout, she missed the exam and has to postpone her graduate school applications.

She declined to provide her full name for security reasons.

“In just the past few days, I have heard from many people, including my colleagues, that they are looking for smugglers to take them and their families out of Iran,” Davoud, from Mashhad, said

He continued: “The government wants to torture us so that we submit and accept their conditions.”