Tunisia's electoral commission confirmed on Tuesday that a presidential runoff vote will pit law professor Kais Saied against detained media mogul Nabil Karoui.
The result from Sunday's vote, thrusting two political outsiders to the fore, was a shock to a political establishment in place since the 2011 fall of dictator Zine El Abidine Ben Ali.
Saied led the first round of polling on Sunday with 18.4 percent of the vote against Karoui's 15.6 percent, taking both through to an October runoff, said the electoral commission, ISIE.
It said turnout reached 49 percent in Sunday's election, markedly down from the 64 percent at the country's first free presidential poll in 2014.
Abdelfattah Mourou, a first-ever presidential candidate from the Islamist-inspired Ennahdha party, came third.
Shortly before the official results were announced, Ennahdha congratulated the two winners, implicitly dispelling rumours that Karoui would be disqualified over alleged violations during his campaign.
Any such disqualification would have seen Mourou qualify for the final runoff.
ISIE has said it is investigating alleged electoral violations, including by media mogul Karoui's Nessma TV.
"There have of course been violations and the judiciary will respond. But cancelling a vote is even more serious," ISIE chief Nabil Baffoun said.
"The violations were not decisive and the votes of the electors must be respected."
Observers from the European Union said the first round has been "transparent".
But it called for the candidates to have the "same opportunities" to campaign, in an apparent allusion to Karoui.
Depending on potential appeals, the second round could be organised for October 6, the same day as legislative elections, or on October 13, ISIE said.
The two candidates, though very different, have both drawn on "anti-system" sentiment among the electorate, spurred by exasperation with the status quo.
Unemployment runs at around 15 percent, particularly affecting young graduates, while inflation eats away at already low incomes.
"With these presidential polls, we're back to the situation in 2011," said Mohamed Marzouk, the head of civil society organisation Murakiboun, which has been observing the elections.
"The voters' message is: 'Everybody out, and then we'll see'," he said.
The two leading candidates "have been preparing the ground for years. They have shown that elections don't happen on Facebook -- at least not only," Marzouk said.
Le Quotidien newspaper earlier said Tunisian voters had "preferred to venture into the unknown rather than extend a hand again to those who betrayed their hopes".
Saied, a fiercely independent academic aged 61, advocates a radical decentralisation of power, with local democracy and the ability to remove elected officials from office during their mandates.
He is also perceived as very conservative on social issues.
On Tuesday, three weeks ahead of the parliamentary polls, he said he would not be aligning himself with any political party.
"There is no alliance between political parties, or with a party or a coalition of parties, there is a project," he told the press.
"Anybody who wants to join can do so."
Karoui, a 56-year-old media magnate, is under investigation for alleged money laundering and has been in pretrial detention since August 23.
Karoui's arrest in the runup to the election cemented his status as an outsider, despite being a longtime supporter of president Beji Caid Essebsi, whose death on July 25 brought forward the polls.
Appeals to have Karoui freed before the election were rejected, but his lawyers were planning to refile for his release after the results were confirmed.
Karoui remains eligible to run despite his imprisonment, as long as any conviction does not also specifically deprive him of his civil rights, according to ISIE.
Ennahda leader Rached Ghannouchi on Tuesday urged his supporters to turn out en masse for the parliamentary polls on October 6, in which he is running for the first time.