A nationwide state of emergency has been declared by the prime minister’s office and a curfew has been imposed in Sri Lanka’s western province. Last night, Sri Lankan President Gotabaya Rajapaksa left the country after months of unrest that culminated in protesters gathering at the presidential palace. He agreed to resign today. In recent days, protesters have occupied several government buildings demanding their top leaders resign, showing their anger over a three-month economic crisis. People have flocked to the presidential palace – swimming in the pool, admiring the paintings and lying on the pillow-filled beds. On Wednesday, groups were seen scaling the wall and entering the office as crowds roared in support, cheering them on and waving the Sri Lankan flag. Police stationed outside the prime minister’s office fired several rounds of tear gas and a military helicopter briefly circled overhead, but the protesters appeared undeterred and eventually entered the compound. Read more: What is happening in Sri Lanka? Protesters have now taken over the country’s national television station, Rupavahini. Bhasura Wickremesinghe, a 24-year-old marine electrical engineering student who came with friends, said the president’s flight from the country was a “timid act”. Use Chrome browser for more accessible video player 3:48 What is happening in Sri Lanka now? “I’m not celebrating. There’s no point in celebrating. We have nothing in this country right now.” Mr Rajapaksa left the country on a military jet bound for the Maldives with his wife and two bodyguards. The speaker of Sri Lanka’s parliament said Mr Rajapaksa had appointed Prime Minister Ranil Wickremesinghe as acting president, enabling him to carry out presidential responsibilities. Image: Photo: AP Protesters have vowed to occupy official buildings until top leaders leave and are demanding the resignation of the prime minister. Sri Lankan lawmakers agreed to elect a new president next week, but struggled to decide on the composition of a new government to pull the bankrupt country out of economic and political collapse. The new president will serve out the remainder of Mr Rajapaksa’s term, which ends in 2024, and could potentially appoint a new prime minister, who would then have to be approved by parliament. However, the promised resignations did not end the crisis. At one point, protesters also burned the prime minister’s private residence. The economic crisis in Sri Lanka has caused severe food and fuel shortages, with people queuing for hours to buy supplies.