Thousands of people marched in sweltering temperatures above 30 degrees Celsius (86°F) to the Court of Final Appeal, carrying placards and banners denouncing the jailing of the activists.

Thousands of people took to the streets of Hong Kong on Sunday to protest against the jailing of three young democracy activists, with many questioning the independence of the Chinese-ruled city's judiciary.

On Thursday, Joshua Wong (20), Nathan Law (24) and Alex Chow (27), were jailed for six to eight months for unlawful assembly, dealing a blow to the youth-led push for universal suffrage and prompting accusations of political interference.

Thousands of people marched in sweltering temperatures above 30 degrees Celsius (86°F) to the Court of Final Appeal, carrying placards and banners denouncing the jailing of the activists.

Former student leader Lester Shum, who helped organise Sunday's rally, said the number of protesters was the highest since pro-democracy protests in 2014 that paralysed parts of the financial hub for 79 days.

“This shows that the Hong Kong government, the Chinese Communist regime and the Department of Justice's conspiracy to deter Hong Kong people from continuing to participate in politics and to protest using harsh laws and punishments has completely failed,” Mr. Shum said.

Protesters brandished a large banner saying: “It's not a crime to fight against totalitarianism.” They shouted: “Release all political prisoners. Civil disobedience. We have no fear. We have no regrets.”

Ray Wong (24), leader of pro-independence group Hong Kong Indigenous, said the issue is uniting government opponents.

“Since the Umbrella movement, the radical and milder forces walked their own path,” he said, referring to the 2014 democracy movement. “We're now standing together. It is a good start.”

In Sunday's protests, some signs said “Shame on Rimsky", referring to Justice Secretary Rimsky Yuen, who Reuters reported last week had overruled other legal officials who initially advised against pursuing jail terms for the three activists.

Mr. Wong and his colleagues triggered the 2014 mass street protests, which attracted hundreds of thousands at their peak, when they climbed into a courtyard fronting the city's government headquarters.

They were sentenced last year to non-jail terms including community service for unlawful assembly, but the Department of Justice applied for a review, seeking imprisonment.

On Friday, Mr. Yuen denied any “political motive” in seeking jail for the trio.

The former British colony returned to China in 1997 under a "one country, two systems” agreement that ensured its freedoms, including a separate legal system. But Beijing has ultimate control and some Hong Kong people are concerned it is increasingly interfering to head off dissent.

5-Year Disqualification

The jail terms for Wong, Law and Chow disqualify them from running for the legislature for the next five years.

Lau Siu-lai, one of six legislators expelled from the city's legislature this year over the manner in which she took her oath of office, said the sentences were unreasonably harsh.

“It appears to be political suppression to strip away young people's right to stand in elections,” she said.

“I hope people will pay attention ... We need to protect Hong Kong's' rule of law.”

Another protester carried a placard of Lady Justice with a red blindfold.

“Hong Kong's Lady Justice and the rule of law... are now being controlled by communists, and are now being twisted and she is now blind,” said 50-year-old artist Kacey Wong.

While the decision to impose tougher sentences on the activists attracted widespread criticism in Hong Kong and overseas, the Hong Kong Bar Association and Law Society defended the court's decision.

“Unfounded comments that judicial decisions were made or influenced by political considerations originating outside Hong Kong are unjustified and damaging to our legal system, and to Hong Kong as a whole,” they said in a joint statement on Friday.