Sri Lanka’s former wartime defence chief Gotabaya Rajapaksa has won a presidential election that has split the country along ethnic lines.
Official results showed Mr Rajapaksa took 52.25% of the vote. His rival Sajith Premadasa had already conceded.
Analysts say Mr Rajapaksa was the clear victor in Sinhalese majority areas while Mr Premadasa scored better in the Tamil-dominated north.
The election is Sri Lanka’s first since a deadly terror attack in April.
Militants linked to the Islamic State group targeted churches and high-end hotels across the island on Easter Sunday, killing more than 250 people.
Mr Premadasa publicly conceded when partial results showed Mr Rajapaksa was certain to emerge the winner.
“It is my privilege to honour the decision of the people and congratulate Mr Gotabaya Rajapaksa on his election as the seventh president of Sri Lanka,” Mr Premadasa said.
In a statement on Twitter, Mr Rajapaksa made a call for national unity saying “all Sri Lankans are part of this journey”.
Turnout was 83.7%, the election commission said.
Mr Rajapaksa is due to be sworn in at a ceremony on Monday.
Rajapaksa’s supporters want stability restored
By Jill McGivering, BBC News, Sri Lanka
Gotabaya Rajapaksa commands passionate support among many in the Buddhist Sinhalese majority in Sri Lanka.
He and his brother, Mahinda, who was president here for 10 years, are credited with bringing an end to the country’s long civil war.
Now his supporters want him to restore stability in the aftermath of the Easter attacks by Islamist militants. He is a controversial figure who denies claims of ruthlessness and human rights abuses.
His main rival, Sajith Premadasa, was strongly supported by the Tamil and Muslim minorities here. He offered a more liberal and inclusive vision but may have been damaged by his links to the current government.
A total of 35 candidates stood in the presidential election, the third since the end of the country’s decades-long civil war in 2009.
The country’s incumbent president, Maithripala Sirisena, was not on the ballot. He decided against running after coming under criticism following the Easter Sunday bombings.
The Easter Sunday attacks, which triggered an economic slump in Sri Lanka, cast a long shadow over the election.
The government was forced to admit it had suffered a “major intelligence lapse” after failing to adequately share information from Indian intelligence officials about a potential attack.
Who were the front-runners?
Retired lieutenant colonel Mr Rajapaksa, 70, is a divisive figure who spent a decade as defence secretary under his brother’s presidential rule.
The Podujana Peramuna (SLPP) party candidate is known for his role in helping to end the country’s civil war and has positioned himself as a strong figure who can combat national security fears,
He is popular among Sinhalese-dominated parts of the island, but is disliked by Tamils because of his alleged links to human rights abuses carried out during the final stages of the civil war.
He was in power when thousands of people – particularly Tamils – went missing in what have been described as enforced disappearances between 2005 and 2015.
Ruling party candidate Mr Premadasa, focused on social issues as well as security – campaigning on a promise to eradicate poverty and improve housing.
He is the son of a president who was assassinated by Tamil Tiger rebels in 1993 and is the current housing minister.
Like his rival, he already has a loyal support base and has managed to take on the Rajapaksa family in their own region.
More about Sri Lanka and the Easter Sunday bombings
But what do voters care about?
National security was arguably the biggest issue. However, equality for minorities and unemployment played on voters’ minds as well.
Sri Lanka’s presidential election
What you need to know
- 16 millionSri Lankans eligible to vote
- 35Number of candidates vying for the top job
- Two footLength of ballot paper
- 74.32%Average turnout at previous votes
But the two candidates also promised something different on the international stage. Mr Rajapaksa said he planned to “restore relations” with Sri Lanka’s top lender, China, if he wins the election. This may have been controversial in some circles, due to concerns over the size of Sri Lankan debt to the Asian superpower.
Mr Premadasa, meanwhile, was seen as leaning more towards India and the US.