HONG KONG (Reuters) - Hundreds of Hong Kong protesters, some waving Catalan flags and banners urging “a fight for freedom together”, rallied in support of a separate Catalonia on Thursday, broaching an issue that is anathema to Hong Kong’s rulers in Beijing.

In Hong Kong’s demonstrations, millions have taken to the streets in sometimes violent clashes over what they see as China’s tightening grip. Most protesters in the former British colony want greater democracy, among other demands, although a small minority is calling for independence.

In that sense, they share some common ground with separatist demonstrators in Spain’s wealthy northeast region of Catalonia, which was rocked by protests after nine separatist leaders were sentenced this month to long prison terms for a failed independence bid in 2017.

Thursday’s rally in Hong Kong was held in a downtown garden, home to a cricket club in colonial days, one of the few to have obtained a permit from authorities in recent weeks. The organizers said 3,000 protesters took part. Police put the number at 550.

Some Hong Kong protesters went online to urge people not to attend, saying it was too provocative and risked denting international support for their own cause.

There was a small demonstration on Thursday in solidarity with the Hong Kong protesters outside the Chinese Consulate-General in Barcelona, which La Vanguardia newspaper said attracted more than 100 people.

Most banners at the Hong Kong rally called for Catalan freedom or denounced perceived police brutality in clashes with Hong Kong protesters over five months of unrest. But there were a couple of large flags calling for Hong Kong’s independence and a brief, muted chant along the same lines. That is a red line for the Communist Party rulers in Beijing.

Slideshow ( 12 images )

Hong Kong authorities formally banned a group promoting independence from China in September last year, the first time a political organization has been outlawed since the 1997 handover to Chinese rule.

In Spain, all but one of the main political parties have consistently opposed an independence referendum for Catalonia, but separatist parties are not banned and the region already enjoys a degree of political autonomy and control over part of its budget.

Ricard Bosom, 36, a tourist from Barcelona, said he supported the Hong Kong protesters.

“The context (of Catalonia and Hong Kong) is different,” he told Reuters. “Both are different stories, but in general terms... it is about an oppressive and tyrannical state against a group of people that are trying to do something different and they are not listened to.”

In 1997 Hong Kong was allowed to retain extensive freedoms not enjoyed in mainland China under a “one country, two systems” formula, including an independent judiciary and right to protest.

But many Hong Kong residents are angry at what they see as a relentless march toward mainland control.

Slideshow ( 12 images )

“I come because I think Catalonia needs support, just like Hong Kong,” said Jason Chan, 22, a clerk. “Pursuing democracy is a universal value.”

China denies meddling in Hong Kong and accuses the United States and Britain of fomenting the unrest, the biggest popular challenge to Chinese President Xi Jinping since he came to power in 2012.

He warned this month that any attempt to divide China would end in “crushed bodies and shattered bones”.

Independence is a highly divisive issue in Catalonia, a region of more than 7 million inhabitants that has its own language, parliament and flag.

Protests erupted in the region after the separatist leaders were sentenced on Oct. 14 over the 2017 independence bid, which included holding a referendum that had been banned by the courts and then making a unilateral declaration of independence.

Students have boycotted classes and protesters have focused on strategic targets to cause maximum disruption, including the airport serving Barcelona - similar to strategies used by Hong Kong activists.