ABUJA (Reuters) - Nigerian activist Omoyele Sowore and former national security adviser Sambo Dasuki left prison Tuesday evening after the attorney general ordered their release on bail, in recognition of court orders.

Former presidential candidate Omoyele Sowore talks to the media after being released on bail by Nigeria's government, in Abuja, Nigeria December 24, 2019. REUTERS/Afolabi Sotunde

The release followed growing internal and international pressure on the Nigerian government to abide by court orders.

State security had ignored several court orders that former adviser Dasuki, who has been held since 2015, be released. It also sparked protests earlier this month when it re-arrested activist and former presidential candidate Sowore hours after his release on bail.

Dasuki left prison at roughly 9 p.m. (2000 GMT) on Tuesday and joined his family at his home in the Asokoro district of Abuja. Sowore was released earlier in the evening, greeting jubilant supporters.

“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,” Attorney General and Justice Minister Abubakar Malami said in a statement.

The government has accused Dasuki, who served under former President Goodluck Jonathan, of fraud involving $68 million of defense spending. He has pleaded not guilty. (bit.ly/34Oy9Ip)

Dasuki has been granted bail several times but the government had refused to release him. In 2016, a judge at the court of the Economic Community of West African States (ECOWAS) ordered his release, saying his detention was unlawful and arbitrary. (bit.ly/376wxv8)

Sowore, who also founded news website Sahara Reporters, was first arrested in August. He has pleaded not guilty to charges of treason, money laundering and harassing the president.

Video of Sowore screaming and shouting as he was wrestled to the ground by security officials in court, only hours after his initial release on bail, circulated widely on social media in Nigeria and internationally.

“While I am grateful for reports on Yele’s long overdue release on bail, my number one concern is for his safety,” Sowore’s wife, Opeyemi Sowore, said in an emailed statement. “We remain resolute on Yele being cleared of all baseless charges.”

On Monday, the government’s own National Human Rights Commission called on the administration to respect court rulings.

Six U.S. members of Congress, including Senate Minority Leader Chuck Schumer, also wrote to Malami on Dec. 20 that they were “deeply concerned that established legal procedure and the rule of law” were not being followed in Sowore’s case.

Nigerian advocacy group SERAP also hailed the move, but called on the government to release others it described as unfairly detained, including journalist Agba Jalingo.

“The government cannot continue to pick and choose which court orders to obey,” it said.