Sri Lankans waited Friday for a formal announcement confirming their president had resigned after he fled to Singapore to escape anti-government protests triggered by his country's dire economic crisis.

Gotabaya Rajapaksa submitted his resignation late Thursday after arriving in Singapore from the Maldives, where he initially escaped after demonstrators overran his palace at the weekend.

Rajapaksa's departure came after months of protests over what critics said was his mismanagement of the island nation's economy, leading to severe hardships for its 22 million people.

The parliamentary speaker's office said Rajapaksa had emailed his resignation and it would be examined before a formal announcement -- expected on Friday -- is made.

"The authenticity and the legality of the e-mail will have to be checked out" before being formally accepted, the speaker's spokesman Indunil Yapa told AFP.

Rajapaksa would be the first president to resign since Sri Lanka adopted a presidential system of government in 1978.

Activists on Wednesday stormed the office of Prime Minister Ranil Wickremesinghe
Activists on Wednesday stormed the office of Prime Minister Ranil Wickremesinghe AFP / Arun SANKAR

At a seafront boulevard that has served as the headquarters of a protest movement seeking to oust him, a small crowd gathered its remaining strength late Thursday to celebrate his resignation.

Only a few hundred people were there to mark the major milestone, with many veterans of the protest movement exhausted after enduring tear gas barrages and tense confrontations with security forces in the preceding days.

But the lack of a formal announcement of his resignation injected a note of caution into the celebrations.

"I certainly feel, I think the crowd here definitely does feel, quite happy about it," activist Vraie Balthaazar told AFP.

"But at the same time, I think there's also, until we see the letter, there's always a sense of apprehension."

Map of Colombo locating key buildings in the Sri Lankan capital.
Map of Colombo locating key buildings in the Sri Lankan capital. AFP / Cléa PÉCULIER

Under Sri Lanka's constitution, Prime Minister Ranil Wickremesinghe -- whose resignation is also being demanded by protesters -- would automatically become acting president until parliament can appoint a successor.

Rajapaksa, his wife Ioma and their two bodyguards arrived in Singapore from the Maldives on board a Saudia airline flight.

As president, Rajapaksa enjoyed immunity from arrest, and he is understood to have wanted to go abroad before stepping down to avoid the possibility of being detained.

The former Maldivian president Mohamed Nasheed is believed to have played a behind-the-scenes role in getting him out of the country, and said Rajapaksa feared he would be killed if he remained.

"I believe the President would not have resigned if he were still in Sri Lanka, and fearful of losing his life," Nasheed tweeted.

A small but jubilant crowd, some waving the national flag, danced and chanted in celebration outside the presidential secretariat as news of the resignation broke
A small but jubilant crowd, some waving the national flag, danced and chanted in celebration outside the presidential secretariat as news of the resignation broke AFP / Arun SANKAR

Singapore's foreign ministry confirmed Rajapaksa had been allowed to enter the city-state for a "private visit", adding: "He has not asked for asylum and neither has he been granted any asylum."

He is expected to look to stay in Singapore for some time, according to Sri Lankan security sources, before potentially moving to the United Arab Emirates.

The spiralling economic crisis led to Sri Lanka defaulting on its $51-billion foreign debt in April, and it is in talks with the IMF for a possible bailout.

But the talks have been thrown off course by the political upheaval, and an IMF spokesman said Thursday the fund hoped the unrest can be resolved soon so they can resume.

The island has nearly exhausted its already scarce supplies of petrol, with the government ordering the closure of non-essential offices and schools to reduce commuting and save fuel.

In Colombo, demonstrators earlier left several of the emblematic state buildings they had taken over in recent days after Wickremesinghe instructed security forces to restore order and declared a state of emergency.

"We are peacefully withdrawing from the Presidential Palace, the Presidential Secretariat and the Prime Minister's Office with immediate effect, but will continue our struggle," said a spokeswoman for the protesters.

Witnesses saw dozens of activists leave Wickremesinghe's office as armed police and security forces moved in.

The capital was put under curfew and armoured personnel carriers patrolled some areas.

Hundreds of thousands of people had visited the prime minister's compound since it was opened to the public after he fled and his security guards backed down.

By Thursday afternoon, the gates were closed, with armed guards posted both inside and outside.

Police said a soldier and a constable were injured in clashes with protesters outside the national parliament as security forces beat back an attempt to storm the legislature.

The main hospital in Colombo said about 85 people were admitted with injuries on Wednesday, with one man suffocating to death after being tear-gassed at the premier's office.

The military and the police were issued fresh orders Thursday to firmly put down any violence, and warned troublemakers they were "legitimately empowered to exercise their force".

But student Chirath Chathuranga Jayalath, 26, said: "You cannot stop this protest by killing people. They'll shoot our heads but we do this from our hearts."