Hong Kong democracy activist Joshua Wong was making his way to Germany on Monday after he was released from a brief spell in custody following a mistake in his bail conditions, his party confirmed.

Wong, 22, was among multiple prominent democracy advocates who were detained late last month in a roundup by police as the semi-autonomous city reels from more than three months of unprecedented pro-democracy protests.

Joshua Wong. File photo: Demosisto.

He was accused of “inciting others to take part in unauthorised assembly” among other charges and later released on bail.

On Sunday, he said he was detained at Hong Kong airport for “breaching bail conditions” after returning from Taiwan and as he then tried to make another overseas trip to Germany. He also planned to travel to the United States after.

But he was released by a court on Monday after it emerged the detention was a procedural error and that his bail requirements allowed him to take any overseas trips that had been arranged before his arrest, local news station RTHK reported.

“Joshua Wong is on his way to Germany today and will be allowed to the US as scheduled,” a spokeswoman for his party Demosisto told AFP, adding that he will be overseas until late September.

Wong began his career as an activist when he was just 12 years old and later became the poster child of the huge pro-democracy “Umbrella Movement” protests of 2014 that failed to win any concessions from Beijing.

He has previously been jailed for his involvement in those protests.

Hong Kong Free Press relies on direct reader support. Help safeguard independent journalism and press freedom as we invest more in freelancers, overtime, safety gear & insurance during this summer’s protests. 10 ways to support us.