The Court of Appeal on Wednesday sent a teenager to a rehabilitation centre for hitting a police officer with a brick at a protest last year after an appeal by the Department of Justice.
Lincoln Chan, 17, was originally put on a year of probation after he pleaded guilty to assaulting the officer in Mong Kok on January 19, 2020.
The officer suffered injuries to his left hand.
The protest began with a rally in Chater Garden in Central to urge the international community to sanction Hong Kong officials found to have undermined human rights. It spread to Mong Kok in the evening.
A panel of three judges had earlier ruled that the magistrate was wrong to give the defendant a probation order and a custodial sentence was required.
Chan's lawyer told the court that the conviction has had a strong impact on him, and will continue to affect him in future.
Judge Derek Pang said attacking a police officer could "evolve, escalate to something much larger," but stressed the defendant wasn't being punished for his political stance.
Chief High Court Judge Jeremy Poon said medical reports suggested Chan was unfit to spend time at a detention centre but would be mentally and physically fit to stay at a rehab facility.
Poon said he had a read a letter written by the defendant, expressing remorse and asking the court not to impose a stiffer sentence.
But Poon also said the court had already set aside the probation order and they were of the view that a rehabilitation order is the most suitable punishment.
He said the court will give its full reasons in writing on Friday next week.