COLOMBO, SRI LANKA -- Sri Lanka鈥檚 acting president on Monday declared a state of emergency that gives him broad authority amid growing protests demanding his resignation 鈥 just two days before the country鈥檚 lawmakers are set to elect a new president.

Ranil Wickremesinghe became acting president on Friday after his predecessor, Gotabaya Rajapaksa, fled abroad and resigned after months-long mass protests over the country鈥檚 economic collapse.

Wickremesinghe鈥檚 imposition of the state of emergency came as protests demanding his resignation continued in most parts of the country, with some demonstrators burning him in effigy.

The emergency decree invokes sections of the Public Security Ordinance that allow Wickremesinghe to make regulations in the interest of public security and order. Authorities can authorize detentions, take possession of property and search premises. Wickremesinghe can also change or suspend any law during the state of emergency.

Wickremesinghe said in a statement that negotiations for a bailout package with the International Monetary Fund were nearing conclusion while discussions for assistance with foreign countries have progressed. There has been no comment from the IMF on Wickremesinghe's assessment of the bailout talks.

He said that relief was being provided to people and steps have been taken to resolve shortages of fuel and cooking gas.

However, Wickremesinghe claimed 鈥渆lements within society鈥 were trying to disrupt peace in Sri Lanka. He did not provide specifics, but said that disruptions will not be allowed to hinder the country鈥檚 progress.

Wickremesinghe said that peaceful protesters who had legitimate concerns would be engaged with by the government and solutions found for them. He also urged political parties to put aside differences and form 鈥渁n all-party government which would allow the country to recover from the economic crisis.鈥

There was no immediate response from political parties to his latest comments, but they have been working to try to form a unity government.

Lawmakers who met on Saturday began the process of electing a new leader to serve the rest of the term abandoned by Rajapaksa. Nominations for the election of the new president will be made on Tuesday. If there is more than one candidate, the lawmakers will vote on Wednesday.

Sri Lanka Bar Association said the emergency laws 鈥渕ust not be used to suppress any legitimate expression of opinion on the election to the president nor to suppress any dissent or disagreement on a particular candidate.鈥

The association also stressed that these laws should not be used to 鈥渟tifle peaceful protests and dissent or to make arbitrary arrests and detentions.鈥

Sri Lanka for months has lacked funds to pay for imports of basic necessities such as food, fertilizer, medicine and fuel for its 22 million people. The country's rapid economic decline came as a surprise because he economy had been expanding with a growing, comfortable middle class.

Sri Lanka is seeking help from the IMF and other creditors, but top officials have said its finances are in such bad shape that obtaining a bailout has been difficult.

The economic hardships led to political upheaval and widespread protests demanding the resignation of the government led by Rajapaksa. Although many ministers resigned in April, Rajapaksa remained in power until last week, when he flew first to the Maldives then to Singapore.

The main protests have occurred in the capital, Colombo, where large crowds occupied the front of the president鈥檚 office for more than 100 days. The protestors stormed the president's official residence and office on July 9, forcing Rajapaksa to flee.

The protesters accuse Rajapaksa and his powerful political family of siphoning money from government coffers and hastening the country鈥檚 collapse by mismanaging the economy. The family has denied the corruption allegations, but Rajapaksa acknowledged that some of his policies contributed to the economic meltdown.