Ahead of their release on Tuesday, Joshua Wong and Nathan Law had lodged appeals against the custodial sentences handed down to them in August, according to a post on the Facebook page of Demosisto, their political party.

Hong Kong's Chief Justice Geoffrey Ma, who heads the Court of Final Appeal, granted Wong and Law bail while they appeal their six-month and eight-month jail terms, saying there was no flight risk.

The hearing for the appeal applications was set for November 7.

Activists' jailing sparked concerns

The jail sentences for unlawful assembly, linked to the Umbrella Movement protests of 2014, were handed down by the city's Court of Appeal as fears rose that Beijing was tightening its grip on the semiautonomous Chinese city.

Listen to audio 08:17 Share Hong Kong's new generation of activists Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2fhps WorldLink: Hong Kong's new generation of activists

The Hong Kong government had appealed against their earlier punishment of community service sentences, demanding custodial sentences, which were granted in August.

The sentences meant the young protest leaders couldn't stand for local elections in the subsequent five years, although the Hong Kong government said there had been "absolutely no basis" to claims of a political motivation in the sentencing.

Amnesty International called the authorities' demand for jail terms a "vindictive attack" on freedom of expression.

Unlawful assembly charges

Wong and Law - alongside Alex Chow, who did not apply for bail - were jailed for their part in the 2014 "Umbrella Movement" demonstrations that set off mass protests and an international outcry.

Wong and Law and other student protesters were sentenced after storming into the blocked-off government complex in protests over electoral reform proposals. They were found guilty of taking part or inciting others to take part in an unlawful assembly.

Watch video 01:51 Share Protests erupt after Thailand deports Hong Kong activist Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2QtiV Protests erupt after Thailand deports Hong Kong activist

jbh/se (dpa, AP, Reuters, AFP)