Tunisians chose Sunday from a crowded field in the country's second free presidential poll since the 2011 Arab Spring, with electoral authorities expressing concern about a poor turnout among young voters.
Prominent candidates included media mogul Nabil Karoui, behind bars due to a money laundering probe, Abdelfattah Mourou, heading a first-time bid for Islamist-inspired party Ennahdha, and Prime Minister Youssef Chahed.
Voting stations closed as scheduled at 6:00 pm (1700 GMT), in what was the first round of the presidential election.
"Young people of Tunisia, you still have an hour to vote!" electoral commission (ISIE) head Nabil Baffoun urged before the close.
"We must leave our homes and vote - it's a right that we gained from the 2011 revolution which cost lives," Baffoun added, visibly disappointed by the turnout.
Three hours before the polls closed, only 27.8 percent of registered voters had cast their ballots, according to the ISIE.
Mourou smiled broadly as he voted, while Chahed said he was "proud of this great event", after casting his own ballot.
"The world is watching. By tonight or tomorrow, Tunisia will be in good hands," the premier said.
His popularity has been tarnished by a sluggish economy and the rising cost of living.
The prime minister has also found himself having to vehemently deny accusations that Karoui's detention since late August was politically inspired.
'Where are the young?'
At polling stations visited by AFP journalists, there was a high proportion of older voters, but few young people.
"Where are the young people? This is their country, their future," said Adil Toumi, a man in his 60s who came to vote "to participate in a national celebration, a victory for democracy".
The election follows an intense campaign characterised more by personality clashes than political differences.
It had been brought forward by the death in July of 92-year-old president Beji Caid Essebsi, whose widow also passed away on Sunday morning.
Essebsi had been elected in the wake of the 2011 revolt that overthrew former dictator Zine El Abidine Ben Ali.
Publication of opinion polls has officially been banned since July, but one thing appeared sure -- many voters were undecided until just ahead of voting, due to the difficulty of reading a shifting political landscape.
Some hopefuls have tried to burnish anti-establishment credentials to distance themselves from a political elite discredited by personal quarrels.
One key newcomer was Kais Saied, a 61-year-old law professor and expert on constitutional affairs, who avoided attaching his bid to a political party.
Instead, he lobbied door-to-door to drum up support for his conservative platform.
Another independent candidate was Defence Minister Abdelkarim Zbidi, a technocrat running for the first time, although with backing from Essebsi's Nidaa Tounes party.
The long list of active runners was trimmed by the last-minute withdrawal of two candidates in favour of Zbidi, although their names remained on the ballot paper.
But Karoui's detention, just 10 days ahead of the start of campaigning, has been the top story of the election.
Studies suggested his arrest boosted his popularity.
A controversial businessman, Karoui built his appeal by using his Nessma television channel to launch charity campaigns, handing out food aid to some of the country's poorest.
But his detractors portray him as a would-be Silvio Berlusconi, the former Italian premier who they allege partly owns his channel.
On Friday, an appeal for the Tunisian mogul's release from prison ahead of the election was rejected, his party and lawyers said.
The polarisation risks derailing the electoral process, according to Michael Ayari, an analyst for the International Crisis Group.
Isabelle Werenfels, a researcher at the German Institute for International and Security Affairs, called the vote a democratic "test" because "it may require accepting the victory of a polarising candidate" such as Karoui.
Distrust of the political elite has been deepened by an unemployment rate of 15 percent and a rise in the cost of living by close to a third since 2016.
Jihadist attacks have exacted a heavy toll on the key tourism sector.
Around 70,000 security forces were mobilised for the polls.
Exit polls were expected overnight Sunday into Monday, but preliminary results not due from the electoral commission until Tuesday.
The date of a second and final round between the top two candidates has not been announced, but it must be held by October 23 at the latest and may even take place on the same day as legislative polls, October 6.