The Department of State Services (DSS) has released Omoyele Sowore, convener of RevolutionNow Movement.
Sowore was released on Tuesday evening following a directive from Abubakar Malami, minister of justice.
The DSS had initially refused to release the activist who was granted bail by two different courts.
Sowore was arrested by the DSS on August 3 ahead of the planned nationwide protest.
He was released temporarily after 124 days but forcefully rearrested at a federal high court in Abuja in less than 24 hours after his release.
The circumstance around his rearrest in the court of the law sparked national outrage. After the court invasion, Malami took over the case from the DSS.
On Tuesday, the attorney general ordered the DSS to release the 48-year-old activist and Sambo Dasuki, former national security adviser (NSA), saying his office would not defy court orders.
He said his office ordered the release of both Sowore and Dasuki based on respect for the judiciary and the rue of law.
The attorney general said the defendants “are enjoined to observe the terms of their bail and refrain from engaging in any act that is inimical to public peace and national security as well as their ongoing trial which will run its course in accordance with the laws of the land.”