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.
He said earlier that he was willing to resign to ensure the safety of civilians and to make way for an all-party government, but soon after his announcement videos started circulating of his house up in flames.
The prime minister lives with his family in the private home and uses his official residence for official business only.
Whether or not the president’s and the prime minister’s planned resignations will be enough to appease the protesters is not yet clear.
“Just two resignations alone will not satisfy the demands, the demand of a system change, but at least this is a start if the president and the prime minister depart,” said Bhavani Fonseka, a prominent human rights lawyer in Colombo.
“There has to be a peaceful transition of power which is yet to be seen,” she warned.
Sri Lanka: The basics
Sri Lanka is an island nation off southern India: It won independence from British rule in 1948. Three ethnic groups – Sinhalese, Tamil and Muslim – make up 99% of the country’s 22 million population.
One family of brothers has dominated for years: Mahinda Rajapaksa became a hero among the majority Sinhalese in 2009 when his government defeated Tamil separatist rebels after years of bitter and bloody civil war. His brother Gotabaya, who was defence secretary at the time, is the current president but says he is standing down.
Now an economic crisis has led to fury on the streets: Soaring inflation has meant some foods, medication and fuel are in short supply, there are rolling blackouts and ordinary people have taken to the streets in anger with many blaming the Rajapaksa family and their government for the situation.