COLOMBO, Sri Lanka (AP) — Sri Lankan lawmakers chose six-time Prime Minister Ranil Wickremesinghe as president Wednesday to succeed the ousted leader who fled the country in a vote that risks reigniting political turmoil in the troubled South Asian island nation.

Army soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

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. Wickremesinghe became acting president after Rajapaksa fled the country last week and resigned by email.

Policemen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressPolicemen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

Wickremesinghe, 73, 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.

Sri Lankans attend a peaceful sit down protest demanding the ouster of Prime Minister and Acting President Ranil Wickremesinghe outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressSri Lankans attend a peaceful sit down protest demanding the ouster of Prime Minister and Acting President Ranil Wickremesinghe outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)

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

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

COLOMBO, Sri Lanka (AP) — Sri Lanka’s Parliament is voting by secret ballot Wednesday for a new president to lead the country out of the deep political, economic and humanitarian crisis that toppled the previous leader and has left simmering tensions in the island nation.

Prime Minister and Acting President Ranil Wickremesinghe, who has been the face of the government's handling of the economic crisis, is facing a hefty challenge after late support swelled for his main rival.

FILE - Sri Lanka's new Prime Minister Ranil Wickremesinghe gestures during an interview with The Associated Press in Colombo, Sri Lanka, Saturday, June 11, 2022. Sri Lanka’s prime minister and acting president, Wickremesinghe, will face two rivals in a parliamentary vote Wednesday, July 20, on who will succeed the ousted leader who fled the country last week amid huge protests triggered by its economic collapse. (AP Photo/Eranga Jayawardena, File)
© Provided by Associated PressFILE - Sri Lanka's new Prime Minister Ranil Wickremesinghe gestures during an interview with The Associated Press in Colombo, Sri Lanka, Saturday, June 11, 2022. Sri Lanka’s prime minister and acting president, Wickremesinghe, will face two rivals in a parliamentary vote Wednesday, July 20, on who will succeed the ousted leader who fled the country last week amid huge protests triggered by its economic collapse. (AP Photo/Eranga Jayawardena, File)

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.

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 publicizing their vote is a breach of the constitution.

This undated handout photo provided by Sri Lanka's Department of Government Information shows Dullas Alahapperuma, a candidate for the presidential race, in Sri Lanka. Sri Lanka’s prime minister and acting president, Ranil Wickremesinghe, will face two rivals in a parliamentary vote Wednesday on who will succeed the ousted leader who fled the country last week amid huge protests triggered by its economic collapse. Alahapperuma, the leading challenger, was nominated Tuesday, July 19, by a breakaway faction of the ruling coalition after opposition leader Sajith Premadasa withdrew and said he would support him. (Sri Lanka's Department of Government Information via AP)
© Provided by Associated PressThis undated handout photo provided by Sri Lanka's Department of Government Information shows Dullas Alahapperuma, a candidate for the presidential race, in Sri Lanka. Sri Lanka’s prime minister and acting president, Ranil Wickremesinghe, will face two rivals in a parliamentary vote Wednesday on who will succeed the ousted leader who fled the country last week amid huge protests triggered by its economic collapse. Alahapperuma, the leading challenger, was nominated Tuesday, July 19, by a breakaway faction of the ruling coalition after opposition leader Sajith Premadasa withdrew and said he would support him. (Sri Lanka's Department of Government Information via AP)

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.

Related video: Sri Lanka economic crisis: Opposition plans interim government after President's resignation

Alright, let's start this broadcast with the historic and the
Loaded9.17%
Current Time 0:01
Duration 6:32
Sri Lanka economic crisis: Opposition plans interim government after President's resignation
0

That has happened only once before in Sri Lanka when then-Prime Minister Dingiri Banda Wijetunga was chosen by Parliament uncontested in 1993 after former President Ranasinghe Premadasa, father of the current opposition leader, was assassinated.

The economic crisis has left Sri Lanka’s 22 million people struggling with shortages of essentials including medicine, fuel and food while the government negotiates a bailout with the International Monetary Fund. And the resulting political crisis has left worries about whether a new government will be enough to fix the economy and placate a public furious at its politicians' failures.

Army soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

Wickremesinghe, 73, has wide experience in diplomatic and international affairs and has been leading the crucial IMF talks. Serving in a double role as the finance minister, he has delivered weekly addresses in Parliament cautioning that the path out of the crisis would be difficult, while also pledging to overhaul a government that increasingly has concentrated power under the presidency.

Army soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

Wickremesinghe is deeply unpopular among the general public, which sees him as a holdover from the Rajapaksa government that led the country into economic catastrophe.

Only a few lawmakers have publicly said they would vote for Wickremesinghe given the hostility against him. Dozens of lawmakers loyal to Rajapaksa whose homes were burned down by protesters in May are said to be backing Wickremesinghe on the assurance that he will severely punish the perpetrators and maintain law and order.

Tears roll down the cheeks of a protester as she attends a peaceful sit down protest demanding the ouster of Prime Minister and Acting President Ranil Wickremesinghe outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressTears roll down the cheeks of a protester as she attends a peaceful sit down protest demanding the ouster of Prime Minister and Acting President Ranil Wickremesinghe outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)

He had looked to be leading contender during a deadlock in discussions for an alliance between Alahapperuma and opposition leader Sajith Premadasa over who should be the presidential candidate. But support grew quickly for Alahapperuma after Premadasa withdrew and threw his support to him.

Some expected Wickremesinghe supporters within the ruling coalition switched to him, and parties that had not decided their vote said they backed Alahapperuma. A main ethnic Tamil party with 10 lawmakers also decided it will vote for Alahapperuma.

People sit next to a screen telecasting proceedings of election in Parliament outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressPeople sit next to a screen telecasting proceedings of election in Parliament outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)

If Wickremesinghe loses, he most likely will also lose his job as prime minister because the new president has the discretion to appoint a new prime minister. Premadasa is likely to be appointed prime minister if Alahapperuma wins the presidency.

Wickremesinghe is a six-time prime minister making his third attempt at the highest office after losing presidential elections in 1999 and 2005.

Army soldiers stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

Opponents of his candidacy fear he represents an extension of the Rajapaksa rule and a potential comeback for a beleaguered political dynasty.

Students and political activists held small protests Tuesday demanding Wickremesinghe step down before they force him to. Some intimidating posts circulating on social media warned lawmakers against returning to their constituencies if they vote for Wickremesinghe.

Army soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

Alahapperuma, 63, is viewed as a populist, with good public relations and communications skills. Even though he is a former government spokesman and has served in various posts including minister of information and mass media, minister of sports and minister of power under previous governments he previously was not considered for top leadership posts.

Marxist party leader Anura Dissanayake, 53, was also expected to contest Wednesday’s vote. He also ran for president in 2019.

All 225 members of Parliament including the speaker were eligible to vote. The votes were to be counted and results announced immediately.

Policemen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressPolicemen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)

The candidate receiving more than half of the votes will win. If no candidate gets more than 50%, the second preferences of the candidate getting the fewest votes will be included in the respective tallies for the other two candidates.

Protestors in their tent watch telecast of proceedings of election in Parliament in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressProtestors in their tent watch telecast of proceedings of election in Parliament in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
Security men guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressSecurity men guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
Army soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressArmy soldiers patrol outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
Protestors stand next to a screen telecasting proceedings of election in Parliament outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressProtestors stand next to a screen telecasting proceedings of election in Parliament outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
A protestor holds Sri Lankan flag outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
© Provided by Associated PressA protestor holds Sri Lankan flag outside president's office in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Eranga Jayawardena)
Securitymen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)
© Provided by Associated PressSecuritymen stand guard outside the Parliament building in Colombo, Sri Lanka, Wednesday, July 20, 2022. Sri Lanka's Parliament is voting by secret ballot Wednesday for a new president to lead the country out of a deep political, economic and humanitarian crisis. (AP Photo/Rafiq Maqbool)