The Court of Final Appeal has ordered the immediate release of 13 activists jailed for attempting to smash their way into the Legislative Council building in June 2014, granting their appeal on the grounds of a "substantial and grave injustice".
The protesters were given prison terms of up to 13 months in August last year, after the government successfully challenged the community service orders they were originally slapped with.
On Friday, the city's top court set aside both sets of punishments, replacing them with prison sentences equal to the amount of time the 13 had already spent behind bars. The activists had been on bail since late last year pending their appeal.
During the hearing, Chief Justice Geoffrey Ma said the lower appeal court had adopted a new sentencing guideline for unlawful assembly, with this guideline being introduced after the offence was committed. The judges are to hand down their full reasons for their ruling at a later date.
"We do feel happy and excited because we can be immediately released," said one of the protesters, vice-chairman of the League of Social Democrats Raphael Wong.
"However, we don't agree with some points of view of the chief judge that what we had done was violence. We call it force, not violence, because we had no intention at all to hurt anybody."
The 13 had taken part in a protest outside Legco over a controversial plan to develop the northeastern New Territories.
They had already carried out the community service orders they were given by a magistrate in February 2016 after being found guilty of unlawful assembly.
But the Department of Justice took the case to the Court of Appeal, arguing that the punishments were not strong enough as the protest had been on the verge of turning into a riot.
The court agreed with the government and sent the protesters to prison. Most were given 13-month jail terms, with one jailed for eight months after pleading guilty.
In February, the Court of Final Appeal quashed the prison sentences given to pro-democracy activists Joshua Wong, Nathan Law and Alex Chow over the storming of Civic Square in 2014. In that case too, the jail terms had been imposed following an appeal by the government over the relatively lenient punishments originally handed down.