COLOMBO, SRI LANKA -- Sri Lanka's lawmakers agreed to elect a new president next week but struggled Tuesday to decide on the makeup of a new government to lift the bankrupt country out of economic and political collapse.

Suffering from 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 agreed to concede to demands they resign: Rajapaksa promised to step down Wednesday, while Prime Minister Ranil Wickremesinghe said he would leave once a new government was in place. As anger mounted, particularly against Rajapaksa and his influential family, immigration officials said one of the president's brothers tried to leave the country on Monday night. Local media reported he was not able to.

The promised resignations brought no end to the crisis -- and the protesters have vowed to occupy the official buildings until their top leaders are gone. For days, people have flocked to the presidential palace almost as if it were 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.

While lawmakers agreed late Monday to elect a new president from their ranks on July 20, they have not yet decided who will take over as prime minister and fill the Cabinet.

The new president will serve the remainder of Rajapaksa's term, which ends in 2024 -- and could potentially appoint a new prime minister, who would then have to be approved by Parliament.

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.

Corruption and mismanagement have left the island nation laden with debt, unable to pay for imports of basic necessities, causing despair among its 22 million people. Sri Lankans are skipping meals and lining up for hours to try to buy scarce fuel -- a harsh reality in a country whose economy had been growing quickly and had a growing and comfortable middle class, until the latest crisis deepened.

The political impasse is further fueling the economic crisis since the absence of an alternative unity government threatened to delay a hoped-for bailout from the International Monetary Fund. The government must submit a plan on debt sustainability to the IMF in August before reaching an agreement.

In the meantime, the country is relying on aid from neighboring India and from China.

Asked whether China was in talks with Sri Lanka about possible loans, a Chinese Foreign Ministry official gave no indication whether such discussions 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 resigns as promised Wednesday. The protesters have vowed to wait until both Rajapaksa and Wickremesinghe are out of office.

After the storming of the government buildings, "it was clear there is a consensus in the country that the government leadership should change," said Jehan Perera, executive director of the National Peace Council of Sri Lanka, a think tank.

But, as the political limbo drags on, concerns have grown that the leaders won't fulfill their promises to resign.

"What people are saying is that if the government doesn't go, then there will be another show of people's power and this time it might not be so peaceful," he said.

Months of demonstrations have all but dismantled the Rajapaksa political dynasty, which has ruled Sri Lanka for most of the past two decades.

The protesters accuse the president and his relatives of siphoning money from government coffers for years and Rajapaksa's administration of hastening the country's collapse by mismanaging the economy. The family has denied the corruption allegations, but Rajakpaksa acknowledged some of his policies contributed to the meltdown.

The president has not been seen nor heard from since Saturday, though his office has issued statements that indicate he has continued to carry out his duties.

There is speculation he may try to flee Sri Lanka -- as apparently his brother tried to. S. Kanugala, of Sri Lanka's Immigration and Emigration Officers' Association, said former Finance Minister Basil Rajapaksa's name was spotted on a list of departures from Colombo airport Monday.

Fearing for their safety if they cleared him to leave, the officers left their posts, according to Kanugala, who said he did not know what happened to the brother. But local media reported he was prevented from leaving.

------

Associated Press Business Writer Joe McDonald contributed to this report from Beijing.