Sri Lanka's parliament will elect a new president on 20 July, the speaker of the legislature said, Reuters reported.

President Gotabaya Rajapaksa is set to step down Wednesday. His brothers and nephew had previously resigned as ministers as Sri Lanka began running out of fuel, food and other basic necessities in the worst crisis since independence from Britain in 1948.

Speaker Mahinda Yapa Abeywardena said that during a meeting of party leaders, it was decided that this was necessary to ensure the formation of a new all-party government in accordance with the Constitution. The ruling party has said that the prime minister and cabinet are ready to resign in order to form an all-party government.

Prime Minister Ranil Wickremesinghe, whose private home was set on fire by protesters, said he would resign. His office said that Rajapaksa confirmed his plans to resign to the prime minister, adding that the cabinet would resign as soon as there was agreement to form an all-party government.