COLOMBO, July 9 (Reuters) - Sri Lanka's President Gotabaya Rajapaksa plans to step down, the country's parliamentary speaker said on Saturday, bowing to intense pressure after a violent day of protests in which demonstrators stormed the president's official residence and set fire to the prime minister's home in Colombo.

The announcement, following the dramatic escalation in months of largely peaceful anti-government protests over a dire economic crisis on the Indian Ocean island of 22 million people, triggered an eruption of celebratory fireworks in the city.

There was no immediate word from the president himself.

Speaker Mahinda Yapa Abeywardena said in a video statement that Rajapaksa had informed him that he would step down from his post on 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.

Prime Minister Ranil Wickremesinghe also said he was willing to resign to make way for an all-party government, his office said in a statement on Saturday evening.

It was not yet clear if this would quell popular anger.

Details of how a transition of power would take place were also not yet known, although the speaker earlier outlined proposals from a meeting of political parties on Saturday that would include parliament picking an acting president within a week.