A Hong Kong activist with terminal cancer was jailed Tuesday for attempted sedition over a planned protest against Beijing's Winter Olympics that was foiled by a pre-emptive arrest.

Koo Sze-yiu was arrested on February 4, the opening day of the Winter Olympics, after he had announced plans to protest outside Beijing's liaison office in Hong Kong.

The 75-year-old was formally charged the next day with "attempting to do or making any preparation to do an act or acts with seditious intention" -- a colonial-era offence -- and denied bail.

Principal magistrate Peter Law on Tuesday jailed Koo for nine months, saying that the "serious" case required a deterrent sentence.

The longtime activist was defiant in court, saying that "getting jailed is a part of my life".

"I don't mind being a warrior for the democracy movement, and I don't mind being a martyr for democracy and human rights," he said.

Koo is the latest activist to be jailed in Hong Kong's crackdown on dissent, which has been propelled by the national security law -- imposed by Beijing after the city's pro-democracy protests in 2019.

While sedition is a colonial-era law, the courts now treat it with the same severity as acts that endanger national security.

Koo's lawyers had argued that his planned protest was an exercise in free speech and that the sedition charge was unconstitutional.

But the magistrate said the slogans on his protest materials -- which read "down with the Communist Party and one-party dictatorship" -- aimed to overthrow the regime, and were provocative given the context of 2019's protests.

Veteran activist Koo Sze-yiu has been jailed for attempted sedition over a planned protest against Beijing's Winter Olympics
Veteran activist Koo Sze-yiu has been jailed for attempted sedition over a planned protest against Beijing's Winter Olympics AFP / Philip FONG

"During the movement, many people directed blame toward the Chinese Communist Party, and despite the movement ending, many have not yet recovered emotionally," Law said.

"(The slogans) will once again provoke emotions of discontent and disaffection."

He added that Koo could have also emboldened calls for boycotting the Winter Olympics.

Born in the Chinese city of Zhongshan, Koo has spent most of his life in activism, from opposing the Portuguese colonial government in Macau to fiercely criticising Beijing's crackdown in Hong Kong.

He has been jailed at least 11 times in Hong Kong since 2000, and was diagnosed with terminal rectal cancer in 2020.

His latest stint in prison ended in July last year after he served five months for violating the government's ban on protesters covering their faces during the 2019 protests.

The veteran activist was unbowed Tuesday after his sentencing, telling the court he had no regrets.

"The Chinese government has destroyed freedom and democracy in Hong Kong," he said, and blasted China's treatment of dissidents in the mainland -- pointing to opaque trials and lengthy jail terms.

"Compared to what they have experienced, my sacrifice is nothing."