Election watchdogs had asked for his liberation, arguing the vote could not be fair if he is detained.
Top Tunisian candidate, Nabil Karoui, was freed Wednesday from prison according to his lawyers.
"The Court of Cassation [the country’s top court] has annulled the detention order," a member of Karoui’s legal team told the press, adding that the candidate walked free from the Mornaguia prison located in the northern area of the country's capital of Tunis.
Karoui was detained in August before the first round of elections and spent the entire campaign in jail, waiting for the verdict in a case for money laundering and tax evasion. The tycoon has always denied the accusations against him. The case against Karoui was brought in 2016 ago by Transparency International, an anti-corruption watchdog. It is not clear when a final verdict will be made in the case.
"His release saved our transition and the situation at the last moment ... We were in a very difficult moment in Tunisia which really threatened Tunisian democracy," Karoui's spokesman said.
The media magnate's freeing came days before Sunday’s second-round runoff presidential election.
Election watchdogs had asked for his liberation, arguing the vote could not be fair if he was detained.
Tunisia's electoral body had itself warned that the imprisoned candidate, if he loses, could contest the result and ask for its annulation as he was not able to communicate directly with potential voters.
Polling stations will open on Sunday for the third time since August as some seven million Tunisians are preparing to choose their next president. Voters went to the polls Oct. 6 for parliamentary elections.
Karoui took 15.6 percent of the vote in the first round of the election and on Sunday he will face Kais Saied, a law professor who came in first with 18.4 percent last August. Both presidential hopefuls are political outsiders who present themselves as anti-establishment candidates.
After 2011’s ousting of former President Zine El Abidine Ben Ali, a dictator who led his the North African country for 23 years, Tunisia opted for a parliamentary system over fears of concentrating too much power in the hands of one person. The presidency was thus relegated to a secondary role, leaving it in charge of foreign policy, defense and national security.
The conservative, moderate Islamist Ennahdha party has come first last Sunday in Tunisia’s parliamentary election. It was followed closely by Qalb Tounes, Karoui’s party.