Story highlights Court endorsed a stricter standard for future protests which could result in more prison sentences

Wong said the "road ahead is still very difficult" for the city's pro-democracy movement

Hong Kong (CNN) Hong Kong pro-democracy activist Joshua Wong scored a substantial legal victory Tuesday, as the city's top court threw out the prison sentences handed to him and two other leaders of the 2014 Umbrella Movement protests.

In August, Wong, Nathan Law and Alex Chow were sentenced to between six and eight months in prison for public order offenses stemming from the protests, which shut down parts of the city for several months.

They were originally given community service and suspended sentences, but an appeals court controversially upgraded that to prison time. Tuesday's decision quashes their prison sentences and reinstates the initial ruling.

While the Court of Final Appeal (CFA) endorsed a higher standard for public order offenses put forward by the Court of Appeal, it said the judges were wrong to apply that standard retroactively to Wong, Law and Chow's case.

However, the city's top court warned that in future, public order offenses, even those stemming from civil disobedience, would be dealt with strictly and could result in prison terms.