TUNIS — One of the two candidates in the runoff to become Tunisia’s president was released from prison on Wednesday, just four days before the vote.

As he stepped from the prison on Wednesday night, the candidate, Nabil Karoui, was greeted by the cheers of his supporters, who had gathered outside, with some waving flags with his face on them.

Mr. Karoui, leader of the secular Qalb Tounes, or Heart of Tunisia party, had been arrested on Aug. 23, as part of an investigation into money laundering and tax fraud. Mr. Karoui has said the allegations amounted to a politically motivated smear campaign.

A day before his release, Mr. Karoui, 56, had sent a letter to the High Independent Authority for Elections asking to be able to visit the 24 districts of Tunisia in order to campaign and give interviews to the media. If his request was not granted, Mr. Karuoui, a businessman and co-owner of a popular TV network, said in the letter, he would seek the postponement of the election.