A former member of a now defunct Hong Kong independence group was jailed Friday for possessing explosives during pro-democracy protests that swept the financial hub nearly two years ago.

Louis Lo, 29, pleaded guilty to storing TATP, a high-explosive that was discovered in a police raid on an industrial building in July 2019. He was given a 12-year sentence.

At the time of the raid Hong Kong was convulsed by huge and often violent protests calling for greater democracy and police accountability.

China dismissed the protests and has responded with a broad crackdown against dissent in the restless city.

Lo was a member of the Hong Kong National Front, a small fringe group that advocated independence and has since disbanded.

At the time police said they uncovered a homemade explosives laboratory in the raid where Lo was arrested, alongside around a kilogramme of TATP.

TATP requires skill to manufacture but has been used in a number of major terror attacks, including in bombings in London in 2005 and on hotels and churches in Sri Lanka in 2019.

Books and leaflets advocating independence were also found in Lo's possession.

During sentencing High Court Judge Andrew Chan described Lo as the "mastermind" of the explosives lab.

China has imposed a broad crackdown against dissent in Hong Kong since protests rocked the city in 2019
China has imposed a broad crackdown against dissent in Hong Kong since protests rocked the city in 2019 AFP / Anthony WALLACE

"This court does not know to what use the TATP was intended to be put, but again, I know it has the capacity to inflict very serious damage to the life and property of the general public," Chan said.

"This court would be failing its duty to the public if it doesn't impose very heavy and deterrent sentence," he added.

During the 2019 protests, huge crowds hundreds of thousands strong marched for democracy.

Violent clashes between protesters and riot police escalated as the months wore on.

Towards the latter stages police said they found a handful of explosive devices.

While independence has only ever been a fringe political view in Hong Kong since the city's 1997 handover to China, popular protest slogans such as "Liberate Hong Kong, revolution of our times" were viewed by Beijing as an unacceptable challenge.

Last year China imposed a sweeping national security law on Hong Kong outlawing any acts deemed subversion, secession, collusion and terrorism.

The law's broad wording and application has snuffed out dissent and a swathe of opposition figures have been detained or fled.

Almost all those charged under the law so far are being prosecuted for holding political opinions now deemed illegal.