Sri Lanka's President Gotabaya Rajapaksa and Prime Minister Ranil Wickremesinghe agreed on Saturday to resign after protesters stormed the president's residence and office amid demands from party leaders in Parliament that both politicians step down.
The prime minister's spokesperson, Dinouk Colambage, said Wickremesinghe told party leaders that he will resign when all parties have agreed on forming a new government.
Likewise, Parliament Speaker Mahinda Yapa Abeywardena said in a video statement Rajapaksa had informed him that he will step down from his post next Wednesday.
"The decision to step down on 13 July was taken to ensure a peaceful handover of power," Abeywardena said. "I therefore request the public to respect the law and maintain peace," he said.
The news of the president's decision triggered an eruption of celebratory fireworks in parts of Colombo city.
The leaders' resignations came after the biggest protest yet swept Sri Lanka on Saturday as tens of thousands of people broke through barricades and entered President Gotabaya Rajapaksa's residence and nearby office to vent their fury against a leader they hold responsible for the nation's worst economic crisis.
"The president was escorted to safety," a source told Agence France-Presse (AFP), adding that troops fired in the air to prevent angry crowds from overrunning the president's official residence. Some protesters, holding Sri Lankan flags and helmets, broke into the president's home, video footage from local TV news NewsFirst channel showed.
Sirasa TV, a private broadcaster, showed crowds entering the once tightly guarded residence.
Thousands of people swarmed into Colombo's government district, shouting slogans against the president and dismantling several police barricades to reach Rajapaksa's house, a Reuters witness said.
Reuters could not immediately confirm the president's whereabouts.
Hours after his resignation, protesters also broke into the prime minister's private residence and set it on fire.
The office of Prime Minister Ranil Wickremesinghe said the protesters forced their way into his Colombo home on Saturday evening. It wasn't immediately clear if he was inside at the time of the attack.
Sri Lanka has suffered through months of food and fuel shortages, lengthy blackouts and galloping inflation after running out of foreign currency reserves to import vital goods.
The island of 22 million people is struggling under a severe foreign exchange shortage that has limited essential imports of fuel, food and medicine, plunging it into the worst financial turmoil in seven decades.
Many blame the country's decline on President Gotabaya Rajapaksa. Largely peaceful protests since March have demanded his resignation.
Earlier in the day, huge crowds had poured into the capital for the demonstration, the latest expression of unrest sparked by the island nation's unprecedented economic crisis.
Police had withdrawn a curfew order issued on Friday after opposition parties, rights activists and the bar association threatened to sue the police chief.
Thousands of anti-government protesters ignored the stay-home order and even forced railway authorities to operate trains to take them to Colombo for Saturday's rally, officials said.
Discontent has worsened in recent weeks as the cash-strapped country stopped receiving fuel shipments, forcing school closures and rationing of petrol and diesel for essential services.
Sampath Perera, a 37-year-old fisherman took an overcrowded bus from the seaside town of Negombo 45 kilometers (30 miles) north of Colombo, to join the protest.
"We have told Gota over and over again to go home but he is still clinging onto power. We will not stop until he listens to us," Perera said, in reference to the popular catchcry of protestors: "Gota go home."
He is among the millions squeezed by chronic fuel shortages and acute economic turmoil.
Political instability could undermine Sri Lanka's talks with the International Monetary Fund (IMF) seeking a $3 billion bailout, a restructuring of some foreign debt and fundraising from multilateral and bilateral sources to ease the dollar drought.