SALT, Jordan — The reversal last week of a deeply unpopular tax law appeared to defuse days of mass protests in the Jordanian capital, Amman, but out in the provinces, Rami Fawri was not impressed.

“Are we supposed to clap?” asked Fawri, a 40-year-old owner of a stationery shop in Salt, a hilltop city west of Amman. “They want me to forget what they did to me before? No, I remember. I remember the prices went up. We are suffocating.”

Jordan is known for its relative stability in an often-tumultuous region, and U.S. officials looked on with concern last week as this key Middle Eastern ally faced its largest street protests since the Arab Spring unrest of 2011.

The introduction of the tax law proved too much for many Jordanians struggling with price increases amid stagnant economic growth. Demonstrations that had been bubbling in Salt and other provincial cities for months spread to central Amman, drawing a wide cross-section of Jordanians. They chanted for the prime minister and his government to be sacked and for the law to be reversed, and they got it.

But while Jordan’s King Abdullah II appears to have averted an immediate crisis, he faces a difficult road ahead as he balances the need to address the country’s economic woes with the demands of an emboldened population.

“People have discovered that they have power which they didn’t know they had before,” said Labib Kamhawi, a prominent political analyst and government critic.

Jordan is embarking on a three-year program of painful economic measures ordered by the International Monetary Fund to cut the kingdom’s yawning public debt. In Salt, demonstrations began in February after the government eliminated subsidies on bread, doubling prices.

Living costs in Jordan are already among the highest in the Middle East, and incomes have not kept up. Unemployment is at 18 percent. Fuel prices are more than 50 percent higher than in the United States.

Adding to the economic stress are at least 650,000 recent Syrian refugees, on top of a population that includes millions of Palestinians whose ancestors were displaced from their homes long ago.

Largely devoid of natural resources, Jordan survives in large part on handouts. While the Trump administration has slashed aid elsewhere, the United States has pledged more money to Jordan, which shares a 150-mile-long border with Israel and is a hub for thousands of U.S. troops. But assistance from Saudi Arabia has dried up as that kingdom faces its own economic squeeze and butts heads with Amman politically.

Ordinary Jordanians complain that they have become the country’s new checkbook through taxes while graft and fiscal waste are allowed to continue among the political elite.

“The real problem of Jordan is corruption — rampant, very influential corruption — from the top down,” Kamhawi said. “Irrespective of how much [money] you inject, it evaporates. This is why people went berserk.”

In Amman, protesters largely refrained from chants directly criticizing the king, though there was the occasional round of “Abdullah, where are you?”

Abdullah lacks the broad popularity of his father, the late King Hussein. While Jordan holds parliamentary elections, the prime minister is appointed by the king. After a series of constitutional changes that began three years ago, the king also has the power to appoint the head of the judiciary, army and intelligence ministries, as well as members of the Senate.

“We are with the leadership, but he has to be with us,” said Fawaz Salim al-Jreabea, who led a group of demonstrators from the Bani Sakher tribe to the ­demonstrations in Amman. “He has to change.”

In the short term, all eyes are on the new prime minister, Omar al-Razzaz, a Harvard-educated economist who previously work­ed for the World Bank and most recently held the position of education minister.

His first move, shelving the tax law, pleased the streets, but the next hurdle will be choosing a cabinet acceptable to the public.

“We don’t want the same faces, these rotating chairs,” Jreabea said.

Political analysts say many Jordanians have been restrained about criticizing the monarchy outright or upsetting the political status quo because they fear the kind of anarchy that has racked neighboring Syria and nearby Yemen, which have been devastated by civil wars. But hunger can mean people feel they have less to lose, Kamhawi said.

“Will Jordanians tolerate all of this poverty in return for not having chaos like Syria and Yemen?” asked Mahmoud al-Dabbas, a sociologist based in Salt. “People don’t want to lose everything.”

But he said the mood is changing in such cities as Salt. While demonstrations have ebbed in the capital, they have continued on a smaller scale outside. They lack any clear leadership structure, making them more likely to spin out of control, analysts say.

Standing with his 2-year-old daughter atop his shoulders at a protest in central Amman, Mohammed Herzala, a 39-year-old furniture store owner, said his only demand was to be able to support his family.

In front of him, the crowd chanted exuberantly. Men raised their hands in time to a drumbeat.

Herzala said he brought his children to the demonstration because “I want them to know how to ask for their rights.”

Ranya Kadri and Taylor Luck in Amman contributed to this report.