Mahinda Rajapaksa, in office since 2005, called the election two years early with analysts predicting an easy win.
However, many voters have since rallied behind the challenger, former health minister Maithripala Sirisena.
There were armed policemen at every polling station because of concerns the vote would not be peaceful and free.
Mahinda 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 Maithripala Sirisena appears to have capitalized on this perception, making gains among Sinhalese who usually vote for Mahinda Rajapaksa.
Maithripala Sirisena is also expected to win most of the vote from the ethnic minorities that make up about 30% of Sri Lanka’s population.
Mahinda Rajapaksa, however, remains hugely popular with many in the Sinhalese majority.
Casting his ballot in his constituency on January 8, the president said he was confident he would be given the leadership of the country for the third time.
“We will have a resounding victory. That is very clear. From tomorrow, we will start implementing our manifesto,” he told reporters according to the AFP news agency.
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 Rajapaksa government crushed the rebellion, but only after a bloody conflict had killed thousands of people.
Both sides in the 26-year civil war have been accused of atrocities.
The government has always denied allegations that many thousands of civilians were killed during the army’s final assault on Tamil Tiger rebels.
The run-up to the current election – the second presidential poll since the war ended – was marred by violence and allegations of intimidation.
On January 7, an opposition activist died a day after being shot while organizing a rally.
Voters in the Tamil-dominated northern city of Jaffna said there was a loud bang as polling stations opened, with some reports claiming a grenade had been thrown.
But observers said that voting had been broadly peaceful across the island.
Mahinda Rajapaksa was last elected in 2010 when he defeated his former army chief Sarath Fonseka, who was later jailed on charges of implicating the government in war crimes.
Polling stations opened at 07:00AM on January 8, and results are expected on January 9.
MIvEzURzRQQThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…