Jordan’s Prime Minister Hani Mulki resigned Monday after thousands protested in recent days against his government’s plan to increase taxes, causing uncertainty in a country that is a vital U.S. ally in the region.

King Abdullah II has accepted the resignation of Mr. Mulki’s government, Jordan’s Royal Court said.

The king thanked the prime minister in a statement for his service and dedication in making difficult and unpopular decisions.

The resignation appears aimed at alleviating tensions after intensifying calls for Mr. Mulki’s dismissal by protesters who said his handling of the economy caused problems. But it remains unclear if the demonstrators will be pacified by the move.

The protests began Wednesday in Amman and other Jordanian cities and towns against a proposed revision to the country’s income tax law that would raise taxes, allow authorities to target more people and scrap exemptions on medical treatment and education.