A veteran politician backed by the party of ousted Sri Lankan president Gotabaya Rajapaksa is the favourite to be elected to replace him, analysts said after nominations closed Tuesday.
Ranil Wickremesinghe is a six-time former prime minister who became acting president after Rajapaksa resigned, but is despised by the protesters who forced his predecessor from office.
Wickremesinghe has the formal backing of the Rajapaksas' SLPP, the largest bloc in the 225-member parliament that will elect the president on Wednesday.
His main opponent will be SLPP dissident and former education minister Dullas Alahapperuma, who is being supported by the opposition.
The winner of the three-way contest will take charge of a bankrupt nation that is in talks with the IMF for a bailout, with its 22 million people enduring severe shortages of food, fuel and medicines.
Sri Lanka ran out of foreign exchange to finance even the most vital imports in a crisis triggered by the coronavirus pandemic but exacerbated by mismanagement, critics say.
Months of protests culminated in Rajapaksa fleeing his palace before flying to the Maldives and then Singapore, from where he submitted his resignation.
As acting president, Wickremesinghe has extended a state of emergency that gives police and security forces sweeping powers to deal with troublemakers, and last week he ordered troops to evict protesters from state buildings they had occupied.
An opposition MP said Wickremesinghe's hardline stance against demonstrators was going down well with MPs who had been at the receiving end of mob violence, and most SLPP legislators would side with him.
"Ranil is emerging as the law-and-order candidate," Tamil MP Dharmalingam Sithadthan told AFP.
Political analyst Kusal Perera agreed that Wickremesinghe had a "slight advantage" despite his own party securing just one seat at the August 2020 elections.
"Ranil has regained the acceptance of the urban middle classes by restoring some of the supplies like gas and he has already cleared government buildings showing his firmness," Perera said.
Observers believe that Wickremesinghe will crack down hard if he wins and the demonstrators -- who have also been demanding his resignation, accusing him of protecting the Rajapaksas' interests -- will take to the streets.
The protesters were planning another rally against Wickremesinghe in the capital later Tuesday.
Former president Mahinda Rajapaksa, the deposed Gotabaya's elder brother and head of the clan that has dominated Sri Lankan politics for years, remains in the country and party sources said he was pressing SLPP legislators to support Wickremesinghe.
- Backroom deal -
His main opponent Alahapperuma, a former journalist, is not the object of so much scorn from the demonstrators, despite being an SLPP member.
He promised to form "an actual consensual government for the first time in our history," in a tweet three days ago.
Moments before the formal nominations in parliament, opposition leader Sajith Premadasa announced he was withdrawing from the race in favour of 63-year-old Alahapperuma.
"For the greater good of my country that I love and the people I cherish, I hereby withdraw my candidacy for the position of President," Premadasa tweeted.
Alahapperuma was a rights campaigner in the late 1980s, when Premadasa's late father Ranasinghe ruled the country with an iron fist.
But a legislator from Premadasa's SJB party told AFP that the two men struck a deal overnight for Premadasa to be chosen as the new prime minister should Alahapperuma become head of state.
"We have a common minimum programme that we agreed on," the SJB MP said. "We had only one sticking point about who will be the president and that was sorted out last night."
The third candidate is Anura Dissanayake, 53, leader of the leftist JVP, or People's Liberation Front, which has three parliamentary seats.
MPs will rank the candidates in order of preference in a secret ballot -- a mechanism which gives them a freer hand than an open poll, and previous elections have seen allegations of bribes offered and accepted in exchange for votes.
Candidates need more than half the vote to be elected. If no one crosses the threshold on first preferences, the candidate with the lowest support will be eliminated and their votes distributed according to second preferences.
The new leader will be in office for the balance of Rajapaksa's term, which runs until November 2024.
If Wickremesinghe is confirmed in the post, he is expected to name public administration minister Dinesh Gunawardena, 73, his schoolmate and a strong Rajapaksa loyalist, as the new premier.