A Senegalese government critic and former journalist charged in July with "offending the head of state" via Facebook posts obtained provisional release Friday, his lawyer told AFP.
"Adama Gaye is about to leave prison. The judge has granted him provisional freedom," Cheikh Khouraissy Ba said.
Gaye, a self-described activist for "justice, transparency and progress," targeted President Macky Sall in his posts. He was also charged with "manoeuvres and acts that might compromise public security," Ba told AFP after his July 29 arrest.
His legal team had made several requests for his release and the latest one from Wednesday was granted.
As well as criticising Sall with strident social media messages, Gaye wrote numerous articles accusing the government of mismanagement, particularly in the oil and gas sector which is set for major expansion.
That expansion scheduled for 2021-2022 has caused widespread public concern and shaken the political establishment since a BBC report on the subject was broadcast in early June.
The programme looked at the awarding of off-shore prospecting and exploitation rights to Petro-Tim, part of the Timis Corporation, in 2012 -- just after Sall took office.
Not long after, the president's brother Aliou Sall was hired by Timis, which is run by Australian-Romanian businessman Frank Timis.
In the aftermath of the report airing, Aliou Sall resigned in late June as the head of a state-run savings fund but denied any conflict of interest.
Journalists and human rights groups had bitterly criticised the detention of Gaye, who told AFP by telephone after his arrest he was a "prisoner of conscience."