Veteran politician Beji Caid Essebsi has claimed victory in Tunisia's first free presidential election but bitter rival Moncef Marzouki refused to concede defeat ahead of the release of official results on Monday.
Tunisians took to the polls on Sunday for the leadership runoff vote, with many calling the ballot a landmark for democracy in the country where the Arab Spring was born.
Essebsi supporters partied for most of the night in front of his campaign headquarters, as pollsters estimated between 52.8 and 55.5 percent of voters had opted for the anti-Islamist Nidaa Tounes party leader.
Tunisia's electoral commission said it would announce official results at 8:00 pm local time (2000 GMT) on Monday.
Essebsi, an 88-year-old veteran of previous Tunisian governments, said in an address to his rival after voting closed: "We must work together for the future of Tunisia."
But Marzouki said Essebsi's victory claims were "baseless" and urged people to wait for official results.
It is the first time Tunisians have freely elected their president since independence from France in 1956.
Authorities had called for a big turnout to consolidate democracy following a chaotic four-year transition. Election organisers said turnout was at 59.04 percent.
Troops guarding ballot papers in the central region of Kairouan came under attack on Sunday morning and shot dead one assailant and captured three, the defence ministry said.
Prime Minister Mehdi Jomaa condemned what he called a "desperate attempt" to disrupt the election, and later told AFP that what had happened was of no "impact", adding that the security situation was under control.
The authorities had deployed tens of thousands of soldiers and police to provide security for polling day.
Ahead of the vote, which set Tunisia apart from the turmoil of other Arab Spring countries, jihadists issued a videotaped threat against the North African state's political establishment.
- Mudslinging -
A first round on November 23 saw Essebsi win 39 percent of the vote, six percentage points ahead of Marzouki, a 69-year-old former rights activist installed by parliament two months after December 2011 polls.
Signup to our newsletter and follow us on Facebook and Twitter!
Nidaa Tounes won parliamentary polls in October, making Essebsi favourite to be the next president, but with powers curbed under constitutional amendments to guard against a return to dictatorship.
The campaign was marked by mudslinging, with Essebsi refusing to take part in a debate with Marzouki, claiming his opponent was "extremist".
Essebsi insists that Marzouki represents Islamists, charging that they had "ruined" the country since the 2011 revolution which toppled veteran ruler Zine El Abidine Ben Ali and sparked the Arab Spring.
Marzouki in turn accused Essebsi, who served as a senior official under previous regimes, of wanting to restore the old guard deposed in the revolution.
France's Foreign Minister Laurent Fabius on Monday congratulated the country on its "milestone" vote.
"The successful staging of this presidential election confirms Tunisia's historic role," he said in a statement.
The weekly Tunis Hebdo said the vote would "enhance Tunisia's reputation as the only Arab Spring country that has managed to survive".
- 'Alarming unemployment' -
In a video posted online last week, jihadists claimed the 2013 murder of two secular politicians that plunged Tunisia into crisis, and warned of more killings of politicians and security forces.
The murders had threatened to derail Tunisia's post-Arab Spring transition until a compromise government was formed in January this year.
But the defence ministry said it did not believe jihadists were behind Sunday's pre-dawn attack.
Tunisia also faces major economic challenges.
Its economy is struggling to recover from the upheaval of the revolution, and there are fears of widespread joblessness causing social unrest.
Monday's edition of the French-language La Presse newspaper said Tunisia was still experiencing "investment failures, an alarming unemployment rate, purchasing power at its lowest and a totally disordered social situation".