Ballots were being counted Thursday in Sri Lanka's closest election in recent memory as powerful President Mahinda Rajapaksa faced a surprisingly fierce challenge from a onetime ally.
In spite of threats of violence, precincts across the island nation reported high turnout in what was widely seen as a referendum on Rajapaksa's decade-long rule. He is credited with ending a bloody civil war against ethnic Tamil rebels but is increasingly accused of turning the country of 21 million into a family dictatorship.
Rajapaksa -- who changed the constitution so he could seek a third term -- was so confident of victory that he called elections two years early. But he was stunned by a series of defections from his government, notably from his former health minister, Maithripala Sirisena, the main opposition candidate, who says Rajapaksa has "plundered the country."
Both men hail from the dominant Sinhala ethnic group, Buddhists who make up about 70% of the population. Like Rajapaksa, Sirisena has courted Buddhist nationalist groups and shown little interest in promoting postwar reconciliation with minority Tamils.
The campaign hinged instead on growing disaffection with Rajapaksa's authoritarian style and the vast political clout of his family. The heads of the defense and economic ministries are Rajapaksa's brothers, as is the speaker of parliament.
Charith Senanayake, a marketing consultant in Colombo, the capital, said he cast his ballot for Sirisena because he vowed to roll back presidential powers that Rajapaksa had aggressively expanded.
"We also must put a stop to corruption and eradicate racism and nepotism, which will give all Sri Lankans an equal chance to live with dignity, peace and prosperity," Senanayake said.
With more than 71,000 police watching over polling stations, only a few violent incidents and irregularities were reported. Hand grenades exploded near polling places in the city of Jaffna, once a major civil war battleground, and the town of Vavuniya, although there were no reports of injuries.
In the district of Mannar, a ruling party politician blocked buses from transporting more than 200 voters to their polling places, according to the independent Center for Monitoring Election Violence.
Police Spokesman Ajith Rohana said the incidents "had no impact on the rights of the voters."
"There have been no incidents in respect of assault and or shooting which has prevented voters from exercising their franchise," Rohana said.
With results expected Friday, the closeness of the race has fueled fears of violence, particularly after a campaign marred by threats and intimidation of opposition supporters.
The independent Center for Monitoring Election Violence recorded at least 237 significant incidents of violence, particularly in the Tamil-dominated north. Amnesty International said three prominent opposition activists received death threats on the eve of voting.
U.S. Secretary of State John F. Kerry called Rajapaksa before the vote to urge him to ensure the election is "free from violence and intimidation and that the vote counting is carried out credibly and transparently," State Department spokeswoman Jen Psaki said.
Private polls, although far from reliable, suggested that Sirisena held a slim lead, and analysts predicted that he would split the Sinhala vote while garnering support from Tamils -- who make up 9% of the population -- and other minorities, who revile Rajapaksa.
Tamil Hindus and Muslims accuse the government of taking over their lands and ignoring attacks by Buddhist nationalist groups, particularly against Muslims. Rajapaksa denies charges of bias, arguing that he has built roads and brought electricity to all areas of the country.
Sri Lanka's economy is booming, partly due to investment from China, which has emerged as an important Rajapaksa ally. The president has thumbed his nose at the West, angrily rejecting calls for a United Nations inquiry into atrocities committed at the end of the civil war, in which government troops allegedly killed as many as 40,000 Tamil civilians.
But in the final weeks of the campaign, Rajapaksa promised to launch a domestic investigation into possible army war crimes -- a sharp turnabout that analysts say was a sign of panic.
"I think it shows he's extremely worried -- I don't think he expected the kind of challenge he's had," said Paikiasothy Saravanamuttu, executive director of the Center for Policy Alternatives, a think tank in Colombo.
Yet Rajapaksa still retains many supporters who praise him for ending the nearly three-decade civil war and ushering in a period of relative prosperity.
"We need stability and President Rajapaksa has given us that," said Nazushan Hassen, a voter in Colombo. "I think we must put our country first and community must come second."
Special correspondent Mushtaq reported from Colombo and staff writer Shashank Bengali from Mumbai, India.