Gotabaya Rajapaksa has resigned as president of Sri Lanka after fleeing to Singapore in the face of mass protests at home over his rule.

He arrived in Singapore after first flying to the Maldives on Tuesday night. Reports say he is accompanied by his wife and two bodyguards.

He is believed to have wanted to leave Sri Lanka before stepping down to avoid the possibility of arrest.

The cost of food, fuel and other basic supplies has soared for Sri Lankans.

Singapore’s foreign ministry said Rajapaksa has not asked for asylum and neither has he been granted any asylum as Singapore generally does not grant requests for asylum.

The resignation letter was sent by email to the speaker of parliament, who said he would complete legal processes and announce it officially on Friday.

The streets of Colombo were calmer as anti-government demonstrators began leaving some of the official buildings they had occupied.

The president’s departure has created a threatening power vacuum in Sri Lanka, which needs a functioning government to help dig it out of financial ruin.

Politicians from other parties have been talking about forming a new unity government, but there is no sign they are near agreement yet.