Sri Lankan President Gotabaya Rajapaksa has announced he will step down after protesters stormed his official residence and set the prime minister’s house on fire.
Neither the PM nor the president were in the buildings at the time.
Hundreds of thousands descended on the capital Colombo, calling for Mr Rajapaksa to resign after months of protests over economic mismanagement.
Mr. Rajapaksa will step down on 13 July. PM Wickremesinghe has agreed to resign.
The speaker of parliament said the president decided to step down “to ensure a peaceful handover of power” and called on the public to “respect the law”.
The announcement triggered an eruption of celebratory fireworks in the city.
Political leaders are due to hold further meetings to discuss a smooth transition of power. Sri Lanka’s military has appealed to people to cooperate with security forces to maintain calm.
After Saturday’s events, the United States appealed to the Sri Lankan leadership to act promptly to resolve the country’s economic crisis.
One protester, Fiona Sirmana, who was demonstrating at the president’s house, said it was time “to get rid of the president and the prime minister and to have a new era for Sri Lanka”.
“I feel very, very sad that they didn’t go earlier because had they gone earlier there wouldn’t have been any destruction,” she told Reuters.
Dozens of people were injured in Saturday’s protests, and a spokesperson for Colombo’s main hospital told AFP news agency that three people were being treated for gunshot wounds.
Sri Lanka is suffering rampant inflation and is struggling to import food, fuel and medicine amid the country’s worst economic crisis in 70 years.
It has run out of foreign currency and has had to impose a ban on sales of petrol and diesel for private vehicles, leading to days-long queues for fuel.
The extraordinary events of Saturday appeared to be the culmination of months of mainly peaceful protests in Sri Lanka.
Huge crowds converged on the official residence of President Rajapaksa, chanting slogans and waving the national flag before breaking through the barricades and entering the property.
Footage online showed people roaming through the house and swimming in the president’s pool, while others emptied out a chest of drawers, picked through the president’s belongings and used his luxurious bathroom.
The contrast between the luxury of the palace and the months of hardship endured by the country’s 22 million people was not lost on the protesters.
“When the whole country is under such strain people have come here to release that pressure. When you see the luxuries in this house it is obvious that they don’t have time to work for the country,” Chanuka Jayasuriya told Reuters.