Lau Hong, 16, was also required to get psychological counselling and to participate in community activities. The recommendation for probation was made by the Young Offender Assessment Panel and a probation officer.

The Secondary Six student had shaved his hair in the three weeks he spent in Pik Uk Correctional Institution, where he had been remanded since being found guilty last month of possessing an imitation firearm, an offence punishable by two years’ imprisonment.

The Eastern Court heard Lau was intercepted by police in Admiralty last December 12 while wearing a hood and a face mask, and carrying a cross-body bag containing an eight-inch air pistol with a loaded magazine, a bottle of 1,000 yellow plastic pellets and five “Hong Kong is not China” stickers.

About 50 metres away was a protest staged by the pan-democrats against a Legco debate that was under way to change its rules of procedure to curb filibustering.

Lau testified that he joined the protest only to take pictures, and that he had a habit of carrying the air pistol all the time because he was worried he might be attacked for supporting Hong Kong independence.

But the magistrate rejected his self-defence claim and concluded that the teenager had carried an offensive weapon for the purpose of committing a crime.

Sentencing reports ordered by the court recommended probation and a stint at a training centre or rehabilitation centre. The reports stated Lau was unsuited to a detention centre because of a medical condition.

Defence counsel Poon Siu-bunn urged the magistrate to adopt the recommendation for probation, arguing that his client was a disciplined 16-year-old with good grades and that he had received support from his mother and older sister.