Millions of Sri Lankans are voting in an unexpectedly close election that pits President Mahinda Rajapaksa against one of his former allies.
Mr Rajapaksa, in office since 2005, called the election two years early with analysts predicting an easy win.
But many voters have since rallied behind the challenger, former minister Maithripala Sirisena.
Mr Rajapaksa rode a wave of popularity after the civil war ended in 2009 but he now faces claims of cronyism.
His relatives fill many of the most powerful and influential positions in the country, and critics accuse him of running the state like a family business.
Analysts say Mr Sirisena appears to have capitalised on this perception, making gains among Sinhalese who usually vote for Mr Rajapaksa.
Mr Sirisena is also expected to win most of the vote from the ethnic minorities that make up 30% of Sri Lanka's population.
Mr Rajapaksa, however, remains hugely popular with many in the Sinhalese majority.
He has presided over a period of impressive economic growth and still has political capital from being the leader who brought an end to the war.
Sri Lanka is split along ethnic lines and Tamil rebels launched a campaign for a separate state in 1972. The Sinhalese-majority government crushed the rebellion but only after a bloody conflict had killed thousands of people.
Mahinda Rajapaksa speaks to his supporters as he leaves his final rally ahead of presidential election in Piliyandala January 5
Mahinda Rajapaksa has a huge following, and a defeat would still be a massive shock
The election campaign has been marred by violence and allegations of intimidation.
On Wednesday, an opposition activist died a day after being shot while organising a rally.
And election officials said they were looking into claims that the army had been deployed in Tamil areas, allegedly to deter Tamils from voting.
The BBC's Yogita Limaye in Colombo reports that there are armed policemen at every polling station because of concerns the election will not be peaceful and free, particularly in the north of the country which is home to Tamil minorities.
Mr Rajapaksa was last elected in 2010, when he defeated his former army chief Sarath Fonseka, who was later jailed for implicating the government in war crimes.
Both sides in the 26-year civil war have been accused of atrocities.
Government forces were alleged to have killed many civilians during their final bloody assault on the Tamil Tigers, during which thousands of people were killed.
Polling stations opened at 07:00 (01:30 GMT) on Thursday, and results are expected on Friday.
JUSTCLICK & CONNECT