A judge ordered former PM Hamadi Jebali's release but he remains under investigation for suspected "money laundering", the lawyer, Samir Dilou, told AFP.
He will have to appear on July 20 before an investigating judge of the anti-terrorist unit of Tunis, Dilou added.
For more than a month, Jebali, who served as prime minister from 2011 to 2013, has been under investigation over the activities of his boiler factory in the Sousse region.
Jebali was arrested Thursday in Sousse, a coastal city south of the capital Tunis, on charges of money laundering in connection with transfers of foreign funds to a charity in Tunisia, according to the interior ministry.
He denies the charges and has said the arrest was part of a campaign of settling political scores.
President Kais Saied in July last year sacked the government and suspended the Ennahdha-dominated parliament in a move opponents have called a coup in the only democracy to emerge from the 2011 Arab Spring uprisings.
He later dissolved the assembly, extended his powers over the judiciary and moved to change the constitution.
Saied is under intense criticism from the opposition for excluding it from a national dialogue on a new constitution that he plans to put to a referendum one year on, on July 25.
The opposition, including Ennahdha and human rights groups, accuse him of seeking to adopt a constitution tailored to his needs.
Saied has repeatedly denied his moves are meant to give him a strongman grip.