(Bloomberg) -- A Hong Kong court allowed the government to ban a popular protest song when used with criminal intent, a move likely to fan fears about diminished free speech and raise compliance questions for internet companies in the city.

The Court of Appeal on Wednesday overturned a previous ruling to deny the government’s request to issue an injunction to prohibit Glory to Hong Kong for national security reasons. The Court of First Instance cited the potential chilling effects of such a ban in its July ruling.

The decision could further spook a business community worried about erosion of freedoms in the city. The Hong Kong government has taken wide-ranging measures to stifle dissent, including making a new domestic security law that brought Hong Kong in line with China’s vague legislation around state secrets and espionage.

The song Glory to Hong Kong was popularized during anti-government protests in 2019. Authorities applied for an injunction to make it illegal for anyone to perform or broadcast the song, including the lyrics and melody, to incite secession or insult the national anthem.

The court rejected its bid in July 2023, saying an injunction wouldn’t be necessary because the illegal acts were already punishable under existing criminal laws. The government subsequently challenged that decision, arguing the judge should have deferred to the government’s assessment on the necessity of the ban.

The appeal court on Wednesday acknowledged it had a duty to ensure the injunction doesn’t violate the right to free expression, but it deemed the order justified. Free speech “is not a licence to commit any criminal offence,” the judgment said.

“Prosecutions alone are clearly not adequate to tackle the acute criminal problems,” the court’s judges wrote. “There is a compelling need for an injunction, as a counter-measure, to aid the criminal law for safeguarding national security.” 

The use of the song for journalistic or academic purposes is permitted, according to the decision.

It wasn’t immediately clear whether internet firms such as Google would need to take action to comply with the ruling in Hong Kong. The injunction also bars anyone from allowing others to distribute or play the song with seditious intent or to suggest that Hong Kong is an independent state and has its own national anthem. 

Representatives for Google, Spotify and Apple Inc didn’t immediately respond to requests for comment. A spokesperson for Meta Platforms Inc referred requests to the Asia Internet Coalition.

The AIC — an industry association that counts Google, Spotify Technology SA, Apple and Meta among its members — said in a statement that it was assessing the impact of the injunction. “We believe that a free and open internet is fundamental to the city’s ambitions to become an international technology and innovation hub,” said Jeff Paine, managing director of the association.

The Court of Appeal judges said that internet platform operators, without naming any of them, had indicated they would take down the song if there’s a court order, arguing that the injunction is necessary.

“If the tech company was prudent, they should check how they are hosting the song,” said Dominic Wai, a partner at ONC Lawyers. Internet firms can be held in contempt of court if they infringed on the injunction, he added.

Google-parent Alphabet Inc. has been pressured by local authorities to change its algorithms because searches on its platform for Hong Kong’s national anthem return the protest song, which is also prominent on the company’s YouTube platform. Google, which has about 500 employees in Hong Kong, has refused to comply.

The case revived broader censorship concerns in the city, raising the prospect that tech firms would have to choose between acquiescing to Beijing or exiting the local market altogether, as many Silicon Valley tech giants in mainland China did. 

If companies decide it’s too costly to keep operating in the city, it would reshape Hong Kong’s internet overnight and devastate the open and free business environment the hub has long prided itself upon. 

Mark Daly, a human rights lawyer in Hong Kong, said there was still uncertainty around the injunction, “not least due to the broad nature of the injunction, the novelty and the complexity.” 

“The Court of Appeal doesn’t breathe life into the freedom of expression rights,” he said.

(Updates throughout with more details from the court ruling and context)

©2024 Bloomberg L.P.