A Hong Kong court has sent young activist Joshua Wong and two other student leaders to prison for their roles in huge pro-democracy protests nearly three years earlier.

It is the latest sign that tolerance for dissent is waning in the Chinese-ruled former British colony.

The High Court overturned an earlier verdict that let Wong, Nathan Law and Alex Chow avoid prison, agreeing with prosecutors that the original punishment for joining or leading an unlawful assembly that sparked the protests was too light.

Joshua Wong, left, and Nathan LawJoshua Wong, left, and Nathan Law (Vincent Yu/AP)

They were immediately taken to serve their sentences of up to eight months, which have the added consequence of blocking each of them from seeking public office for five years.

Wong pumped his fist in the air as he walked out of the dock into custody.

He had little visible reaction as the verdict was read out but tweeted soon after: “You can lock up our bodies, but not our minds! We want democracy in Hong Kong. And we will not give up.”

“See you soon,” he added.

The three were found guilty last year of leading or encouraging an illegal rally in September 2014 that kicked off the Umbrella Movement protests that captured world headlines.

Youthful activists brought major thoroughfares to a standstill for 11 weeks to protest against Beijing’s plan to restrict elections in the former British colony.

Wong and Law were originally given community service and Chow had received a suspended three-week prison sentence.