President Muhammadu Buhari has ordered the release of Messers Sambo Dasuki and Omoyele Sowore, attorney-general Abubakar Malami has said.
Mr Malami announced the directive in a statement, according to The Nation newspaper.
“The two 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,” Mr Malami said.
Dasuki, a former National Security Adviser, has been held for about four years despite several orders that he should be released on bail.
He is being prosecuted for alleged corruption. And possession of arms.
Sowore, an activist and journalist, has been held for several weeks despite meeting his bail conditions.
He is being prosecuted for calling for a revolution against bad governance and is accused of plotting to overthrow the government.