Colombo, Sri Lanka CNN  — 

Sri Lanka’s political and economic crisis escalated as protesters stormed the prime minister’s office on Wednesday, demanding the country’s leaders step down after President Gotabaya Rajapaksa fled to the Maldives without resigning.

Rajapaksa had been expected to formally resign Wednesday but instead left the crisis-hit nation and appointed Prime Minister Ranil Wickremesinghe as its acting leader, citing a section of the constitution that allows a prime minister to “discharge the powers, duties and functions of the office of president” when the president is ill or “absent” from Sri Lanka.

Wickremesinghe was also due to formally resign “to make way for an all-party government.”

The lack of resignations further enraged protesters, who want both leaders to vacate their roles as the country’s 22 million people struggle to buy basic goods, fuel and medicine.

Hundreds of demonstrators breached the compound of the prime minister’s office in Sri Lanka’s largest city Colombo on Wednesday and entered the premises, according to footage from the scene and local witnesses.

Demonstrators carry the gate of the prime minister's office during a protest in Colombo on July 13.

The grounds have now been taken over by protesters who are gathering in celebration, following standoffs with armed police at the gates of the property. At least 30 people have sustained injuries and been admitted to the hospital, according to the Colombo National Hospital.

A nurse at the hospital told CNN that many people were brought in due to tear gas inhalation, while others had cuts and bruises likely received when trying to jump over fences. The nurse did not confirm any gunshot injuries.

As per Sri Lanka’s constitution, Rajapaksa’s resignation would only be considered official once the speaker of the parliament receives a letter stating it.

Speaker Mahinda Yapa Abeywardena said that Rajapaksa had reassured him of his resignation over the phone on Wednesday, but that he is still waiting for the official document confirming it.

At the colonial-era prime minister’s office, people could be seen on the balcony, lighting firecrackers and waving the Sri Lankan flag, according to witnesses.

Demonstrators outside demanded that neither the President nor the Prime Minister “be spared.”

This follows months of escalating anger over the economic crisis, with Rajapaksa accused of high-level corruption and mismanagement that ultimately bankrupted the country.

As demonstrators took to the streets, acting President Wickremesinghe appointed a committee of senior armed forces commanders headed by the Chief of Defense Staff Lt. Gen. Shavendra Silva to “restore law and order” in the nation, a high-ranking military official told CNN Wednesday.

Wickremesinghe declared a state of emergency across Sri Lanka and a curfew on Wednesday only to later cancel both orders, according to the prime minister’s office.

In Colombo, a handful of protesters also entered the premises of state broadcaster Sri Lanka Rupavahini on Wednesday, negotiating a “deal” with broadcast staff to not give airtime to politicians such as Wickremesinghe. The broadcaster instead played history and culture programs.

Sri Lanka army soldiers patrol near the official residence of President Gotabaya Rajapaksa three days after it was stormed by anti government protesters in Colombo.

If Rajapaksa’s resignation is confirmed, Sri Lanka will elect a new president on July 20 after the resumption of parliament on July 16, the parliamentary speaker Abeywardena said in a statement Monday

Nominations for the top post will be presented before parliament starting July 19, then a vote will be taken to elect a new president a day later, according to the speaker.

Chief Justice of the Supreme Court Jayantha Jayasuriya will then swear in the next president. The date of the swearing in is typically chosen by the new elected president.

In a televised interview Tuesday, Sri Lanka’s main opposition leader Sajith Premadasa said he would submit his “nomination for the position of president” once the office is officially vacant.

The president flees

Rajapaksa was forced to announce his resignation after after more than 100,000 people massed outside his residence over the weekend.

His planned resignation would leave him without presidential immunity – potentially exposing him to a raft of legal charges and reduced security.

After being blocked from departing the country at least twice on Monday, Rajapaksa and his wife managed to flee to Malé, in the Maldives on Wednesday, according to a high-ranking security official.

They flew on an AN32 troop transport plane from the Sri Lanka Air Force shortly before he was due to step down.

Maldivian air traffic control refused the plane’s request to land until an intervention by the Speaker of the Maldivian Parliament and former President Mohamed Nasheed, according to the official. A spokesperson for Nasheed did not confirm or deny the intervention.

Sri Lanka’s Air Force on Wednesday confirmed Rajapaksa’s departure, saying in a statement: “Pursuant to the request of the government and in accordance with the powers vested in a President in the Constitution of Sri Lanka, the Sri Lanka air force provided a plane early today to fly the President, his wife and two security officials to the Maldives.”

Rajapaksa was previously blocked from departing Bandaranaike International Airport, on Monday after refusing to join a public immigration queue, a high-ranking military source told CNN.

Aides for Rajapaksa arrived at the airport in Colombo on Monday with 15 passports belonging to the President and members of his family – including First Lady Ioma Rajapaksa – who had booked seats on a Sri Lankan Airlines flight leaving for Dubai at 6:25 p.m. local time, according to the military source.

Police use teargas on Wednesday as protesters storm the prime minister's office.
Protesters take over the compound of Sri Lanka's Presidential Palace in Colombo on Saturday.

But immigration officers declined to process the passports given to them by presidential aides, as Rajapaksa and his family were not physically present for cross checks. Eventually, the flight departed without the President and his family on board, the source added.

Another attempt was made to get the family on an Etihad flight scheduled to leave Colombo for Abu Dhabi at 9:20 p.m. local, according to the source, however the same problem occurred, as the Rajapaksas refused to join the public immigration queue for the flight.

In both instances, the Rajapaksa family was in a nearby airport lounge, waiting for confirmation they could board without queuing among members of the public, the source said.

On Tuesday, a video released by a former police officer claimed that Rajapaksa was staying in a private house belonging to a top air force commander. The Sri Lanka Air Force has denied the claim, describing it as propaganda intended to tarnish the image of the corps and its chief.

CNN’s Jake Kwon and Alex Stambaugh contributed to this report.