Sri Lankan lawmakers on Wednesday elected six-time Prime Minister Ranil Wickremesinghe as president to succeed the ousted leader who fled the country in a vote that risks reigniting political turmoil in the troubled South Asian island nation.

Former President Gotabaya Rajapaksa appointed Wickremesinghe as prime minister in May, hoping to bring stability to a country engulfed in its worst economic crisis in memory. The former PM became acting president after Rajapaksa fled the country last week and resigned by email.

Also read: Sri Lanka Parliament to elect president, Ranil Wickremesinghe faces heat of protesters

Wickremesinghe, is a seasoned politician with wide experience in diplomatic and international affairs. He has been leading crucial talks on an economic bailout package with the International Monetary Fund and was backed by members of the fragmented ruling coalition. But he is unpopular among voters who view him as a holdover from Rajapaksa’s government.

The vote of 134 lawmakers put Wickremesinghe ahead of former government minister Dullas Alahapperuma, who received 82 votes. The Marxist candidate had three.

Also read: Sri Lanka acting president declares state of emergency amid protests

Dullas Alahapperuma, a former government minister and spokesman, was nominated by a breakaway faction of the ruling coalition, and ethnic minority parties also said they’ll support him. Marxist party leader Anura Dissanayake was running.

The winner will serve the remainder of Gotabaya Rajapaksa’s term that ends in 2024. Rajapaksa fled the country and resigned by email last week after protesters furious over the country’s economic collapse stormed his official residence and took over key state buildings.

Also read: Sri Lankan students in India worry about home as crisis deepens

When sessions started in the morning, Secretary-General of Parliament Dhammika Dasanayake instructed lawmakers on the voting process and warned them that taking photos of their ballot or publicising their vote is a breach of the constitution.

Also read: When will Indian government brief Parliament on Sri Lanka situation

Presidents in Sri Lanka are normally elected by the public. The responsibility falls on Parliament only if the office of president becomes vacant before a term officially ends.