Sri Lankan Parliament Speaker Mahinda Yapa Abhiwardana accepted the resignation of Sri Lankan President Gotabay Rajapaksa after he fled abroad after demonstrators stormed his residence last week. “Gotabaya resigned legally and I accepted the resignation,” he said in a press statement.

The President of Sri Lanka sent a letter of resignation from Singapore electronically on Thursday.

According to Sri Lanka’s constitution, Prime Minister Ranil Wickremesinghe, who is also demanded by the protesters, will automatically become acting president, so the parliament can elect a deputy to the presidency for the remainder of Rajapaksa’s term.

A Male airport official told AFP that “the Sri Lankan president left the Maldives on a Saudi Airlines plane bound for Singapore” a day after he fled Colombo for the atoll.