A University of Hong Kong student charged under the national security law with advocating terrorism was on Friday released on bail by the High Court.
Yung Chung-hei, 19, is one of four students from the university accused of promoting terrorism, after the students' union passed a motion in July thanking a man who stabbed a police officer for his "sacrifice".
Yung was the only one to be granted bail by West Kowloon Court last week, but the prosecution challenged the decision and took the case to the High Court. In the meantime, Yung was held in custody.
After hearing arguments from the defence and the prosecution, national security judge Esther Toh said she believed the student "would not continue to commit acts endangering national security" while on bail.
The student was released on bail totalling HK$150,000.
He is not allowed to leave Hong Kong, give any media interviews, take up executive roles on student bodies, contact foreign officials or organise activities against the SAR or central governments.
Other bail conditions including reporting to the police four days a week and observing a curfew.