The High Court on Thursday granted bail to former legislator Ray Chan – one of a group of 47 people charged with subversion over Legco primary polls last year.
He had been held in custody since being charged around half a year ago.
After hearing submissions from lawyers, designated national security judge Esther Toh said she had sufficient grounds to believe that Chan would not "continue to commit acts endangering national security".
The former People Power lawmaker appeared emotional after hearing the ruling.
He was released on bail of HK$100,000 and ordered not to do anything that breaches the national security law.
Chan was also barred from leaving Hong Kong and told not to contact foreign officials or lawmakers, or organise any elections.
Fourteen of the 47 defendants in the case have now been released on bail ahead of their trial.