Tight security for 10,000 polling stations
Sri Lankans voted on 17 November to elect a new president to replace Chandrika Kumaratunga, who had reached the end of her second term.
BBC Monitoring answers key questions.
Who is the winner?
Mahinda Rajapakse, prime minister and part of the United People's Freedom Alliance, fought off a close challenge from opposition leader Ranil Wickramasinghe of the United National Party.
A left-wing self-styled "man of the masses", Mahinda Rajapakse holds strong ties to the Buddhist clergy and Sinhalese nationalists. In pre-poll deals with Marxist and Buddhist parties he pledged a hard line in peace talks, including renegotiation of the cease-fire agreement.
On the economy he opposes privatisation, favouring subsidy schemes and protecting rural livelihoods.
What are the main challenges facing Mr Rajapakse?
- Peace: Talks with Tamil Tiger rebels have been stalled since 2003 and relations between the Tamil Tigers and the government are strained. Mr Rajapakse opposes the Norwegian-backed peace process with the Tamil Tigers and wants to radically change it, although he has not spelt out details.
He regards the truce with the rebels as a betrayal of the country and wants to renegotiate it. However, Sri Lanka is under pressure from the international community to revive the suspended peace talks in order to qualify for billions of dollars in aid to rebuild tsunami-hit coastlines.
- Economy: Despite predictions of 6% growth this year, Sri Lankans face rising inflation and living costs. Mr Rajapakse supports a leftist state-dominated economic system and is opposed to the privatisation of state assets. He promises to create 2.4 million jobs in six years.
- Tsunami reconstruction: Last year's disaster displaced about one million Sri Lankans and killed some 31,000 people, and there has been criticism of the government's handling of aid.
Mr Rajapakse has said he will tear up an agreement between President Chandrika Kumaratunga and the Tigers over how to distribute international aid funds.
What is the president's role?
Sri Lanka's presidency holds sweeping powers. The president can appoint or dismiss the prime minister and cabinet, or dissolve parliament. The term is for six years and the position can be held for only two terms.
How did people vote?
Mr Rajapakse polled 4,887,152 votes, or 50.29 per cent of the popular vote. Ranil Wickramasinghe garnered 4,706,366 or 48.43 per cent. Around 13.3 million people were eligible to vote.
Ethnic minority groups, particularly the largest minority, the Tamils, were considered more likely to vote for Mr Wickramasinghe. The Tamil Tigers said they would neither encourage nor discourage Tamils from voting. However, some pro-rebel organisations urged Tamils to boycott the poll and there were reports of intimidation of Tamils who wanted to vote.
There was virtually no voting in the northern region and voting was low in the eastern province. The overall national average of polling was about 75 per cent, elections commissioner Dayananda Dissanayake said.
The Tigers' actions and the low Tamil turnout appears to have contributed to Mr Wickramasinghe's defeat.
Was there much violence during the election?
The campaign was one of the most peaceful for years, and security was stepped up around the country.
Nonetheless, police said that during Thursday's vote, two Tamil Tiger rebels and a Sinhalese civilian died and 17 people were wounded in a string of seven bomb and grenade attacks in the east.
Sri Lanka's last two presidential elections were marred by violence. In 1994, a suicide bomber assassinated UNP candidate Gamini Dissanayake at an election rally. During the 1999 election campaign, a suicide bombing wounded President Kumaratunga and killed 36 others. Both attacks were blamed on the Tamil Tigers.
BBC Monitoring selects and translates news from radio, television, press, news agencies and the Internet from 150 countries in more than 70 languages. It is based in Caversham, UK, and has several bureaus abroad.