COLOMBO, Sri Lanka (AP) — Sri Lanka’s president declared a state of emergency on Friday amid widespread public protests demanding his resignation over the country’s worst economic crisis in recent memory.

President Gotabaya Rajapaksa issued a decree declaring a public emergency effective Friday invoking sections of the Public Security Ordinance, which gives him authority to make regulations in the interests of public security, preservation of public order, suppression of mutiny, riot or civil commotion or for the maintenance of essential supplies.

Under the emergency regulations the president can authorize detentions, taking possession of any property and the search any premises. He can also change or suspend any law.

Police used tear gas and a water cannon twice Friday at protesters near the Parliament criticizing lawmakers for not ousting the president and his government whom they say are responsible for the economic crisis. Protesters are angry that the lawmakers have elected a government-backed deputy speaker of Parliament with a big majority when the protesters say they should be voting Rajapaksa’s government out of power.

Also read | Explosion destroys 92-year-old Hotel Saratoga in Havana, Cuba, 4 died

At first police fired tear gas at a student-led protest that began Thursday after the election of the deputy speaker in what was seen a key victory for the governing coalition, which was seeing defections and uncertain of a clear majority in Parliament.

Separately, police dispersed more protesters with tear gas Friday night also around Parliament.

Sri Lanka is near bankruptcy having announced that it is suspending repayment of its foreign loans and its usable foreign currency reserves plummeting below $50 million. It has $7 billion foreign loan repayments this year out of $ 25 billion to be repaid by 2026. Its total foreign debt is $ 51 billion.

Rajapaksa’s announcement comes as protesters continue to occupy the entrance to the president’s office for a 28th day, demanding Rajapaksa, his brother and Prime Minister Mahinda Rajapaksa and the rest of the powerful ruling family to quit.

Also read | After Boris Johnson, UK opposition leader Keir Starmer under police investigation for breaking lockdown rule

Similar protests have spread to other locations, with people setting up camps opposite the prime minister’s residence and other towns across the country.

For several months, Sri Lankans have endured long lines to buy fuel, cooking gas, food and medicine, most of which come from abroad. Shortages of hard currency have also hindered imports of raw materials for manufacturing and worsened inflation, which surged to 18.7% in March.

As oil prices soar during the Russia-Ukraine conflict, Sri Lanka’s fuel stocks are running out. Authorities have implemented countrywide power cuts extending up to 13 hours a day because they can’t supply enough fuel to power generating stations.

Shops, offices and schools were also closed across the country on Friday, transport came to a near standstill and widespread demonstrations took place against the government.

Also read | What is ‘space jellyfish’ that soared over at Florida coast during the SpaceX launch?

Opposition lawmakers raised objections in Parliament over the use of tear gas against the students, after which the speaker adjourned the session until May 17. Students withdrew from the protest site, warning that they will return when Parliament resumes and demanding that Rajapaksa resign before then.

Some other protesters blocked exits through which the lawmakers tried to leave Parliament and questioned them about what they had achieved for the people in many meetings.

Factories, banks and government offices were also closed Friday, with employees demonstrating in front of them. Black flags were displayed at some shops in response to a call from trade unions and other organizations, and many protesters wore black T-shirts.

Protesters also hung undergarments by a road leading to Parliament and chanted, “This is all we are left with!”

“People have been telling this government to go home for a month,” student leader Wasantha Mudalige said at the Parliament protest. “They have endured big problems that have led to this demand.”

Also read | Explained: Why is Russia’s Victory Day celebration going to be different this year?

“There are discussions going on inside this thieves’ den called Parliament, and none of the people’s issues are discussed there. So the people’s decision is that the Parliament does not reflect their sentiments,” he added.

So far, the Rajapaksa brothers have resisted calls to resign, though three Rajapaksas out of the five who were lawmakers stepped down from their Cabinet posts in mid-April.

Sri Lanka has been holding talks with the International Monetary Fund to get an immediate funding facility as well as a long-term rescue plan but was told its progress would depend on negotiations on debt restructuring with creditors.

Any long-term plan would take at least six months to get underway.

Gotabaya Rajapaksa also declared an emergency and blocked social media when protests started first early in April. But he had to withdraw them under local and international pressure.