People queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

Desperate in the face of severe shortages of food, fuel and medicine, protesters on Saturday stormed embattled President Gotabaya Rajapaksa’s home, his seaside office and the official residence of his prime minister in the most dramatic day of a three-month crisis.

Both officials said they would concede to demands that they resign: Rajapaksa promised to step down Wednesday, while Prime Minister Ranil Wickremesinghe said he would leave once a new government was in place. In a possible indication of the president’s next move, immigration officials said Rajapaksa’s brother, who was once his finance minster, tried to leave the country on Monday night. Local media reported he was not able to.

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

But negotiating a new government has stymied opposition leaders — and the protesters have said they will stay put in the official buildings until their top leaders are gone. For days, people have flocked to the presidential palace turning it into almost a tourist attraction — swimming in the pool, marveling at the paintings and lounging on the beds piled high with pillows. At one point, they also burned the prime minister’s private home.

People queue up to enter the office of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the office of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. (AP Photo/Eranga Jayawardena)

A partial solution came late Monday, with lawmakers agreeing to elect a new president from their ranks in the coming days. Nominations for the post will be submitted on July 19, and a secret vote will follow in Parliament on July 20. The new president will serve the remainder of Rajapaksa’s term, which ends in 2024.

But they have not yet decided who will take over as prime minister and fill the Cabinet. Between Rajapaksa’s expected resignation Wednesday and the vote, the prime minster will serve as president — an arrangement that is sure to further anger protesters who want Wickremesinghe out immediately.

An army soldier walks as people queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressAn army soldier walks as people queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

The political impasse is further fueling the economic crisis since the absence of an alternative unity government threatened to delay an agreement for aid from the International Monetary Fund. In the meantime, the country is relying on aid from neighboring India and from China.

People queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

Corruption and mismanagement have left the island nation laden with debt, unable to pay for imports of food, fuel, medicine and other necessities, causing widespread shortages and despair among its 22 million people. Sri Lanka announced in April it was suspending repayment of foreign loans due to a foreign currency shortage.

Asked whether China was talking with Sri Lanka about possible loans, a Chinese Foreign Ministry official gave no indication whether such talks were happening.

“China will continue to offer assistance as our capability allows for Sri Lanka’s social development and economic recovery,” said the spokesman, Wang Wenbin. “As to its debt to China, we support relevant financial institutions in finding a proper solution through consultation with Sri Lanka.”

On Tuesday, Sri Lanka’s religious leaders urged protesters to leave the government buildings they’re occupying if Rajapaksa steps down as promised Wednesday. The protesters have vowed to wait until both Rajapaksa and Wickremesinghe are out of office.

People queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

It’s not clear what will happen to those men once they do step down.

Months of demonstrations have all but dismantled the Rajapaksa political dynasty, which has ruled Sri Lanka for most of the past two decades, and there is speculation the president may try to flee Sri Lanka — as apparently his brother tried to.

S. Kanugala of Sri Lanka’s Immigration and Emigration Officers’ Association said Basil Rajapaksa’s name was spotted on a list of departures from Colombo airport Monday and his officers feared for their safety if they cleared him to leave.

Kanugala said the officers withdrew from their posts and he did not know what happened to the brother. But local media reported he was prevented from leaving the country.

Protesters shout anti government slogans at the ongoing protest site outside Gotabaya Rajapaksa's office three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressProtesters shout anti government slogans at the ongoing protest site outside Gotabaya Rajapaksa’s office three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. (AP Photo/Eranga Jayawardena)

A protester shouts anti government slogans at the ongoing protest site outside Gotabaya Rajapaksa's office three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressA protester shouts anti government slogans at the ongoing protest site outside Gotabaya Rajapaksa’s office three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

People walk past a poster showing defaced portraits of president Gotabaya Rajapaksa and his brother Basil at the ongoing protest site outside the president's office three days after it was stormed in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople walk past a poster showing defaced portraits of president Gotabaya Rajapaksa and his brother Basil at the ongoing protest site outside the president’s office three days after it was stormed in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

Protesters shout slogans against president Gotabaya Rajapaksa at the ongoing protest site outside his office three days after it was stormed in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressProtesters shout slogans against president Gotabaya Rajapaksa at the ongoing protest site outside his office three days after it was stormed in Colombo, Sri Lanka, Tuesday, July 12, 2022. Protesters have been occupying the seaside office of the president and official homes of the president and prime minister. (AP Photo/Eranga Jayawardena)

People queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

People queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)

© Provided by Associated PressPeople queue up to enter the official residence of president Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo, Sri Lanka, Tuesday, July 12, 2022. Rajapaksa had vacated the building before the protesters came in. (AP Photo/Eranga Jayawardena)