Exit polls in Tunisia suggested that a figure associated with the regime overthrown in 2011 won Sunday's presidential poll, but his rival refused to concede defeat and official results were not expected until later in the week.
At least two exit polls indicated that Beiji Caid Essebsi, 88, had outpolled incumbent Moncef Marzouki by as many as 10 percentage points in a landmark vote to choose the North African country's first freely elected president since it gained independence nearly 60 years ago.
Unlike many of its neighbors, Tunisia avoided a collapse into chaos in the aftermath of an uprising four years ago that kicked off the Arab Spring revolts across the region. But a democratic transition viewed as largely successful has been complicated by a stalled economy, political infighting and sporadic attacks by Islamic militants.
Amid tight security the vote was largely peaceful, but by day's end, the turnout was reported to be relatively low. Tens of thousands of police and soldiers were deployed to watch for possible disruptions.
Sunday's balloting – the culmination of a series of steps including approval of a new constitution and a parliamentary election – pitted Essebsi, leader of the secular bloc that won the largest share of votes in October's parliamentary elections, against Marzouki, a 69-year-old former human rights activist.
This was a second round of voting, coming after preliminary balloting narrowed the race to the two candidates. Essebsi had outpolled Marzouki by six percentage points in last month's first round.
For some voters, Essebsi held out the hope of stability, and with that, a chance of economic progress.
"We need security that will bring jobs and make the economy blossom," said university student Manoubi Ben Hassin, 18, who said he was supporting Essebsi.
But 39-year-old high school teacher Mohamed Ali Ammar saw Essebsi as too closely tied to the dictatorship Tunisians rose up against, and viewed Marzouki's track record as a rights activist as a needed corrective.
"The nation needs freedom to prevail. We need human rights to survive," he said. "Only Marzouki can lead the country. If we save freedom and liberties, we will save the country."
The vote came just days after the fourth anniversary of the death of Mohamed Bouazizi, an impoverished produce vendor who set himself on fire to protest repressive economic and political conditions, triggering Tunisia's uprising against longtime strongman Zine el Abedine ben Ali.
The Islamist Nahda party came to power after Ben Ali's fall, but ceded control after months of what was widely viewed as inept rule, marked by political deadlock and economic deterioration.
It remains a significant minority voice, however, having come in second in October's parliamentary vote. Nahda did not field a presidential candidate.
Official results were expected by Tuesday.
Addala is a special correspondent. Times staff writer Laura King in Luxor, Egypt, contributed to this report.