Sri Lanka's Prime Minister Ranil Wickremesinghe was sworn in Friday as acting president, his office said, replacing Gotabaya Rajapaksa who fled to Singapore following months of protest against him.
Wickremesinghe, 73, took his oath of office before Chief Justice Jayantha Jayasuriya, Wickremesinghe's office said in a brief statement.
Earlier in the day, the crisis-hit country's parliamentary speaker announced that the resignation of Gotabaya Rajapaksa was accepted as he notified him from Singapore that he was stepping down.
The formal declaration makes Gotabaya Rajapaksa — once known as 'The Terminator' for his ruthless crushing of Tamil rebels — the first Sri Lankan head of state to resign since it adopted an executive presidency in 1978.
He emailed in his resignation from Singapore after flying to the city-state from the Maldives, where he initially escaped after demonstrators overran his palace at the weekend.
"Gotabaya has legally resigned" with effect from Thursday, Speaker Mahinda Yapa Abeywardana told reporters. "I have accepted the resignation."
Under Sri Lanka's constitution, Prime Minister Ranil Wickremesinghe — whose departure is also being demanded by protesters — will automatically become acting president until parliament can elect an MP to succeed Rajapaksa for the rest of his term.
The legislature will be summoned on Saturday, Abeywardana told reporters at his residence, adding he hoped to complete the election process "within seven days".