(CNN) Angry protesters who stormed the official residences of Sri Lanka's President have forced him to flee the country, but his sudden departure has plunged the South Asian state deeper into crisis.
Demonstrators furious about economic mismanagement and a spiraling financial crisis have demanded that both President Gotabaya Rajapaksa and Prime Minister Ranil Wickremesinghe vacate their roles.
Rajapaksa agreed to step down but fled to the Maldives on Wednesday, naming Wickremesinghe as acting president.
Amid the chaos, the future of the country's 22 million people is uncertain as they struggle to buy basic goods, fuel and medicine.
Here's the latest.
Despite fleeing the country and appointing Wickremesinghe as acting president, Rajapaksa is yet to formally resign.
Wickremesinghe, meanwhile, posted on Twitter that he would step down as prime minister "to ensure the continuation of the government including the safety of all citizens" but didn't name a date.
As acting president, Wickremesinghe has appointed a committee of senior armed forces commanders headed by the Chief of Defense Staff Lt. Gen. Shavendra Silva to "restore law and order" across 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.
A new president was set to be elected on July 20 after the resumption of parliament on July 16, Parliament speaker Mahinda Yapa Abeywardena said in a statement Monday, with the purpose of ensuring a new all-party unity government is in place as soon as possible, in accordance with the country's constitution.
Rajapaksa's sudden departure briefly clouded that plan in uncertainty; Rajapaksa and his wife flew on Wednesday to Malé, in the Maldives, on an AN32 troop transport plane from the Sri Lanka Air Force, according to a high-ranking security official.
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.
Rajapaksa was previously blocked from departing Sri Lanka at least twice on Monday, after refusing to join a public immigration queue at the Bandaranaike International Airport, a high-ranking military source told CNN.
Abeywardena said President Rajapaksa reassured him of his resignation over the phone on Wednesday, but that he is still waiting for the official document confirming it. As per Sri Lanka's constitution, Rajapaksa's resignation is only considered official once the speaker of Parliament receives a letter of resignation.
"The President who is overseas at the moment phoned to me to reassure me of his resignation from the presidency. With regards to an official document signifying it, I was told that it would reach me within the day today," Abeywardena said during a televised briefing.
Following the protests over the weekend, the International Monetary Fund (IMF) said it was closely monitoring developments in the country.
"We hope to resolve the current situation that will allow for the resumption of our dialogue on an IMF-supported programme while we plan to continue technical discussions with our counterparts in the Ministry of Finance and Central Bank of Sri Lanka," said IMF mission chiefs Peter Breuer and Masahiro Nozaki in a joint statement on Sunday.
At least 75 people were injured during protests in Sri Lanka on Wednesday, according to the National Hospital in Colombo.
Earlier in the day Sri Lankan police used tear gas to disperse protesters. According to a nurse at the hospital, many people were brought in due to tear gas inhalation, others with cuts and bruises likely from trying to jump over fences.
One police officer was seriously injured during the protests Wednesday and was rushed to hospital where he was receiving treatment, Sri Lankan police said Thursday. An army sergeant was also injured in scuffles with protesters, police added.
During this incident, protesters took a T-56 rifle and two clips of live ammunition, containing 60 rounds each, police said. Police were looking for the service weapon and ammunition to bring it back into police custody.
Over the weekend tens of thousands of protesters massed outside the President's office and residence before breaking through security cordons.
Striking images shared on social media show them singing protest songs and chanting slogans calling for Rajapaksa to resign. Other photos showed groups of demonstrators setting up barbecue pits to grill and cook food.
But the most dramatic footage showed protesters swimming in the President's private pool.
Sri Lanka's Armed Forces spirited Rajapaksa away to a naval vessel minutes before protesters stormed his residence, a high-ranking military source told CNN Sunday.
The president came down from his bedroom in the upper floor of the palace and exited the premises moments before the demonstrators broke the compound's first barrier, the source added.
Later on Saturday, protesters targeted Wickremesinghe's house, setting fire to his private residence on Fifth Lane, an affluent neighborhood in the capital. Live video seen by CNN showed the building engulfed in flames as crowds gathered at the scene and cheered.
The leaders were not at their residences when the buildings were breached and were moved to secure locations before the attacks, according to security officials.
Demonstrations continued into the week; on Wednesday, after Rajapaksa left the country, protesters breached the compound of the prime minister's office and also entered the premises of state broadcaster Sri Lanka Rupavahini.
Protests have been escalating in Sri Lanka since March, when public anger erupted on the streets over rising food costs, fuel shortages and electricity cuts as the country struggled to make debt repayments.
The country has suffered its worst financial crisis in seven decades, after its foreign exchange reserves plummeted to record lows, with dollars running out to pay for essential imports including food, medicine and fuel.
For Sri Lankans, the crisis has turned their daily lives into an endless cycle of waiting in lines for basic goods, many of which are being rationed.
Despite earlier efforts by the government to ease the crisis, like the introduction of a four-day work week, Wickremesinghe declared the country "bankrupt" last Tuesday.
In several major cities including the commercial capital, Colombo, desperate residents continue to queue for food and medicine, with reports of civilians clashing with police and the military as they wait in line.
In early July, Energy Minister Kanchana Wijesekera said the country had less than a day's worth of fuel left.
Trains have reduced in frequency, forcing travelers to squeeze into compartments and even sit precariously on top of them as they commute to work.
Patients are unable to travel to hospitals due to the fuel shortage and food prices are soaring. Rice, a staple in the South Asian nation, has disappeared from shelves in many shops and supermarkets.
Public frustration and anger erupted on March 31, when demonstrators hurled bricks and started fires outside the President's private residence.
Police used tear gas and water cannons to break up the protests, and imposed a 36-hour curfew afterward.
President Rajapaksa declared a nationwide public emergency on April 1, giving authorities powers to detain people without a warrant, and blocked social media platforms.
But protests went ahead the next day in defiance of the curfew, prompting police to arrest hundreds of demonstrators.
The crisis has been years in the making, said experts, who point to a series of government decisions that compounded external shocks.
Over the past decade, the Sri Lankan government has borrowed vast sums of money from foreign lenders to fund public services, said Murtaza Jafferjee, chair of Colombo-based think tank Advocata Institute.
This borrowing spree has coincided with a series of hammer blows to the Sri Lankan economy, from both natural disasters -- such as heavy monsoons -- to man-made catastrophes, including a government ban on chemical fertilizers that decimated farmers' harvests.
Facing a massive deficit, Rajapaksa slashed taxes in a doomed attempt to stimulate the economy.
But the move backfired, instead hitting government revenue. That prompted rating agencies to downgrade Sri Lanka to near default levels, meaning the country lost access to overseas markets.
Sri Lanka then had to fall back on its foreign exchange reserves to pay off government debt, shrinking its reserves. This impacted imports of fuel and other essentials, which sent prices soaring.
Topping all that, the government in March floated the Sri Lankan rupee -- meaning its price was determined based on the demand and supply of foreign exchange markets.
However, the plunging of the rupee against the US dollar only made things worse for ordinary Sri Lankans.