Sri Lankans will elect a new president on Saturday in a "finely balanced" race between the early favourite, former defence chief Gotabaya Rajapaksa, and government minister Sajith Premadasa, who has gained momentum in recent weeks.
The election comes amid a deep slump in the country following Easter Sunday attacks on hotels and churches by Islamist militants that killed over 250 people and sharpened tensions between majority Sinhalese and minority Muslims.
Added to that are long-standing grievances of ethnic Tamils, who say they are still to get justice stemming from the human rights violations during a 26-war civil war with Tamil rebels, especially at the closing stages when a UN panel says around 40,000 people were killed.
Rajapaksa, who oversaw the military rout of Tamil fighters under his brother and then president Mahinda Rajapaksa, has campaigned on a platform of national security, playing on the fears of Sinhalese Buddhists following the April attacks claimed by affiliates of the Islamic State in Iraq and Syria (ISIS).
Premadasa entered the fray after an open rebellion against his party leader, Prime Minister Ranil Wickremesinghe, rallying support by pledging to boost welfare programs and embracing disgruntled party stalwarts. He has sought to fire up the countryside with promises of free housing, schools uniforms for students and sanitary pads for women, touching on a topic rarely discussed in public, but which has drawn women to his rallies.
Both the front-runners in a field of 35 candidates said they will seek a balance in Sri Lanka's political and economic ties with China and India that have competed for influence in the island that sits near busy shipping lanes.
However, Rajapaksa and his family are seen as closer to China, which has led post-civil war reconstruction.
There are no opinion polls, but political strategists in the two main campaigns, the minority parties and political analysts say the race has become much closer in recent weeks.
Initially, Rajapaksa was strongly favoured, but Premadasa is seen to have closed in on him in the final two weeks of the campaign, they say.
An internal assessment shared by a government minister who is supporting the Premadasa campaign shows an edge over Rajapaksa after initially trailing him. But Kehelia Rambukwella, the spokesperson for the Rajapaksa campaign, told Reuters on Friday the team was confident of winning.
The election is now "finely balanced" between the two front-runners, Eurasia said in a note. While Gotabaya is banking on the support of the Sinhalese, Premadasa has been assured the support of Tamil parties who strongly oppose a return of the Rajapaksas.
Muslims are also concerned they would be targeted in large-scale surveillance and raids that a Gotabaya presidency might bring.
"The prospect of a new Rajapaksa presidency has heightened ethnic tensions and raised fears among minorities and democratic activists," said Alan Keenan from the International Crisis Group.
About 16 million people are eligible to vote on Saturday with the ballot allowing voters to choose up to three candidates in order of preference.
Votes will be counted soon after polling stations close that evening, but the results are not expected before Sunday.
Anyone who gets over 50 per cent of votes as first choice will win. If there is no clear winner, authorities will hold a second round of counting to determine the winner through preference votes.
One of the challenges the new president will face is to service Sri Lanka's foreign debt, which stands at 45 per cent of its gross domestic product.
A quarter of the debt is owned to China, which has raised fears of a loss of sovereignty after Sri Lanka was forced to hand over control of the giant Hambantota port in a debt-for-equity swap with Beijing in 2017.
"The management of debt is going to be a challenge, we are still paying down the interest on the loans we have taken, we have to start paying the principal, the repayments will rise," said Health Minister Rajitha Senaratne, who is on Premadasa's campaign.
Growth hit a 17-year low of 3.2 per cent in 2018, and the International Monetary Fund has forecast expansion to fall to 2.7 per cent in 2019 as the Easter Sunday attacks dented tourism and broader business activity.
"Given the headwinds facing the economy, we think growth will struggle whoever wins," said Capital Economics in a note. There might be a slight nudge if Rajapaksa wins, reflecting prospect of an upturn in Chinese investment because of his family's close ties with Beijing, it said.