A Rajapaksa political ally was appointed Sri Lanka’s prime minister Friday, hours after army troops and police forcefully cleared the main protest site occupied for months by demonstrators angry at the Rajapaksas over the country’s economic collapse.

The overnight raid occurred even though protesters had announced they would vacate the site on Friday voluntarily, and the U.N., U.S. and others denounced the heavy-handed force that was used. A lawyer said several protesters were hospitalized for injuries and that journalists and a lawyer were among people arrested.

Sri Lankans have taken to the streets for months demanding their leaders resign over an economic crisis that has left the island nation’s 22 million people short of essentials like medicine, food and fuel. Last week, the protests forced out former President Gotabaya Rajapaksa, whose family has ruled Sri Lanka for most of the last two decades.

The prime minister he appointed in May to lead negotiations for a bailout of the bankrupt country succeeded him. Ranil Wickremesinghe was elected president by lawmakers, and he appointed as his own successor his school classmate Dinesh Gunawardena, who is 73 and from a prominent political family.

On Monday, when he was acting president, Wickremesinghe declared a state of emergency giving him the power to change or suspend laws and giving authorities broad power to search premises and detain people. On Friday, he issued a notice under the state of emergency calling out the armed forces to maintain law and order nationwide.

Before dawn, troops and police cleared the main protest camp near the presidential palace in the capital, Colombo, where demonstrators have gathered for the past 104 days. Army and police staff arrived in trucks and buses around midnight, removing tents and blocking roads leading to the site.

Security forces were seen beating up at least two journalists. At least two lawyers also were assaulted when they went to the protest site to offer their counsel, said the Bar Association of Sri Lanka, the main lawyers’ body in the country.

Some protesters were badly injured and some protesters and lawyers were arrested, said Harshani Siriwardana, a lawyer and a protester.

The Bar Association called for a halt to the “unjustified and disproportionate actions” of armed forces targeting civilians. It called on Wickremesinghe to ensure he and his government respected the rule of law and citizens’ rights.

“The use of the Armed Forces to suppress civilian protests on the very first day in office of the new President is despicable and will have serious consequences on our country’s social, economic and political stability,” the association said in its statement.

The leader of the political opposition, Sajith Premadasa, tweeted, “A cowardly assault against PEACEFUL protestors, who agreed to vacate the sites today; A useless display of ego and brute force putting innocent lives at risk & endangers Sri Lanka’s international image, at a critical juncture.”

Hanaa Singer-Hamdy, the U.N. resident coordinator to Sri Lanka, expressed grave concern over the use of force and said journalists and human rights defenders should not be impeded when they monitor demonstrations. “Actions that stifle protests and the right to peaceful assembly can worsen economic and political instability in Sri Lanka,” Singer-Hamdy said.

U.S. Ambassador Julie Chung also expressed concern. “We urge restraint by authorities and immediate access to medical attention for those injured,” she said in a tweet.

Heavy security was present outside the president’s office at midday.

Earlier this week, Wickremesinghe said bailout talks with the International Monetary Fund were near a conclusion and talks on help from other countries had also progressed. He also said the government has taken steps to resolve shortages of fuel and cooking gas.

Even after restoring order and installing a new government, the outlook for reaching agreement on a bailout remains unclear. The head of the IMF, Kristalina Georgieva, told the Japanese financial magazine Nikkei Asia this week that the fund hopes for a deal “as quickly as possible.”

But Wickremesinghe said earlier this month that the task was proving difficult because Sri Lanka is effectively bankrupt.