7 January 2015
Last updated at 16:01
Mahinda Rajapaksa has dominated Sri Lankan politics for a decade
Millions of Sri Lankans are set to vote 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 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.
Maithripala Sirisena (C) has surprised observers by generating huge support
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.
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 open at 07:00 (01:30 GMT) on Thursday, and results are expected on Friday.