The resignation of Sri Lanka’s president has been accepted, the crisis-hit country’s parliamentary speaker announced Friday after the leader fled his country earlier this week, prompting relief among protesters camped outside his former offices.

The formal declaration makes Gotabaya Rajapaksa — once known as “The Terminator” for his ruthless crushing of the Tamil rebellion — the first Sri Lankan head of state to resign since it adopted an executive presidency in 1978.

He emailed in his notice from Singapore after flying to the city-state from the Maldives, where he initially escaped after demonstrators overran his palace at the weekend.

“The president has officially resigned from his position,” parliamentary speaker Mahinda Yapa Abeywardana told reporters.

A few demonstrators gathered at the makeshift headquarters of a months-long protest movement against Rajapaksa outside the presidential secretariat.

“This is a historical moment for all Sri Lankans,” said Catholic priest Jeevantha Peiris.

“We were assaulted, put in prisons, put on travel bans, some of our friends laid their lives down. With all these hardships we have come through,” the 45-year-old told AFP. “We have no fear anymore.”

The former president, he added, was a “bloodthirsty criminal” who should return to Sri Lanka to face justice.

Prime Minister Ranil Wickremesinghe was sworn in as acting president — his accession was automatic under Sri Lanka’s constitution — but many of the demonstrators see him as complicit in the rule of the Rajapaksa clan and also want him to go.

Parliament will meet on Wednesday to elect an MP to succeed Rajapaksa for the rest of his term, the speaker’s office said, with nominations due the previous day.

The Rajapaksas’ SLPP party said it will not field a candidate for president next week, supporting Wickremesinghe’s bid instead.

‘Private visit’ to Singapore

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

Inflation is rampant and the country 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.

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.

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 International Monetary Fund (IMF) for a possible bailout, but the talks have been thrown off course by the political upheaval.

Law and order

In an address to the nation, Wickremesinghe — who ordered a state of emergency on Thursday — warned demonstrators that security forces would maintain order.

“We are committed to safeguarding democracy,” he said. “There is a big difference between protesters and rioters. The rioters will be dealt with according to the law.”

He added that 24 soldiers had been wounded when protesters tried to overrun the parliament Wednesday, two of them seriously.

But authorities were in full control of the emblematic state buildings protesters had occupied in recent days, including the presidential and prime minister’s offices.

The Rajapaksas’ SLPP remains the largest party in parliament and its backing raises the prospect of the legislature electing Wickremesinghe despite the opposition to him on the streets.

If that happens, said Jude Fernando, an academic at the protest site, “then I think we have lost the battle”.

“Just changing leadership, changing the heads, won’t bring about the change,” he told AFP.