This photo taken on November 17, 2015, shows Hong Kong fans holding up signs that read 'Boo' while the Chinese national anthem was being played during a World Cup qualifier at Mongkok stadium in Hong Kong. Photo: AFP/Isaac Lawrence

Hong Kong’s legislature voted for a Beijing-backed law banning insults to China’s national anthem on Thursday, a move critics say further stifles dissent in the restless semi-autonomous financial hub.

Lawmakers approved the bill with 41 in favor and one against, but the chamber’s pro-democracy faction refused to cast their votes and instead shouted slogans denouncing the law.

The vote came as Hong Kongers marked the 31st anniversary of China sending tanks and troops to crush pro-democracy protests in Beijing’s Tiananmen square.

Beijing has been infuriated by Hong Kongers – especially football fans – booing the national anthem to signal dissatisfaction with China’s rule.

The new law, which needs to be signed by Chief Executive Carrie Lam, criminalizes insults to the national anthem with up to three years in jail and fines.

The city’s pro-democracy opposition say the bill is a fresh attempt to criminalize dissent and fights have broken out between rival lawmakers over the legislation.

Thursday’s vote was delayed after a lawmaker threw a jar of foul-smelling fertilizer in the legislative chamber to protest against China’s refusal to acknowledge the Tiananmen crackdown.

The debate was later moved to a different room and the bill was swiftly passed.