Election officials said on Thursday that voter turnout was extremely low in the island's volatile northern and eastern regions dominated by Tamil rebels where two people were killed and 17 wounded in separate incidents during the voting.
A bomb exploded in an eastern Sri Lankan town earlier on Thursday, killing at least two people and critically injuring six, the regional police chief said.
Deputy Inspector-General of Police of eastern Sri Lanka, MMWW Dharmaratna, said two Tamil Tiger rebels were instantly killed when they accidentally detonated a bomb they were putting together on Thursday.
The incident took place in Kalmunai, a Muslim-majority town in eastern Sri Lanka.
However, in the rest of the country the turnout was high and there were no reports of major violence, an election official said.
The first results are expected at midnight (1800 GMT).
A total of 13.3 million people were eligible to vote to elect a president for a six-year term from among 13 candidates.
However, the election was seen as a face off between the present and former premiers.
Prime Minister Mahinda Rajapakse, who wants to review the peace process with the rebels, expressed confidence that he could celebrate his 60th birthday on Friday as the country's fifth executive head of state.
His main rival, 56-year-old opposition leader Ranil Wickremesinghe who supports the peace process, was also upbeat.
The island's Tamil minority, around 13% of the 19.5 million population, shunned the election which was seen as a setback to Wickremesinghe.
But while long voting queues formed in the capital, Colombo, a barricade of burning tyres and palm fronds belched thick black smoke by the entrance to rebel-held territory in the island's east as Tigers enforced a boycott.
The LTTE boycott caused Colombo's
stock exchange to close lower
The streets of the government-controlled Jaffna peninsula, hemmed in by the Liberation Tigers of Tamil Eelam's (LTTE) de facto state in the northeast, were deserted and residents said rebel fronts had warned them to stay at home.
Election officials said about 600 people had voted in the peninsula by 0800 GMT - an area home to around 700,000 Tamils.
But while many residents said they were too afraid to vote, some were defiant.
"I walked two miles to register my rights. No guns can silence our freedom," said 71-year-old pensioner Selva Ratnam.
Colombo's stock exchange closed over 2% lower as traders fretted that the boycott could hurt the chances of Wickremesinghe, who many ethnic Tamils had been expected to vote for.
"Clearly in my view, the LTTE are really using a boycott policy in all but name," said one western diplomat on condition of anonymity. "It's purely about them having the status of being the sole representative of the Tamil people."
"I walked two miles to register my rights. No guns can silence our freedom"
Sri Lankan voter
Sporadic grenade explosions sounded in Batticaloa, in what police said was probably feuding by rebel factions, but officials said the poll was among the calmest in years, with just one murder of a polling agent directly linked to the vote.
Some 95,000 police and security officials were on duty.
Sri Lanka's civil war, which killed over 64,000 people and displaced hundreds of thousands more, is unlikely to resume whoever wins. But the peace process is at its lowest ebb since the ceasefire, especially after suspected rebels assassinated the country's foreign minister in August.