The president of Hong Kong's Law Society resigned on Tuesday after a no-confidence vote exposed a growing determination by traditionally conservative lawyers to challenge perceived threats by Beijing to the business hub's judicial independence.
Hundreds of thousands of people have taken to the streets of Hong Kong, a special administrative region of China, to protest against what they see as interference by Beijing in the affairs of the city, which returned to China in 1997 under a 'one country, two systems' style of rule.
Law Society President Ambrose Lam angered many of the society's 8,000 members by voicing support for controversial statements from Beijing that Hong Kong judges needed to be patriotic, and for praise for the Communist Party of China.
The vote of no-confidence in Lam on Thursday was a surprise to some who said lawyers had faced intense pressure from mainland-linked firms to back him.
"In order to maintain the solidarity of the Hong Kong Law Society, I will tender my resignation to the council with immediate effect," Lam said.
He did not link his resignation to his previous comments but said he would continue to express his personal opinions.
Lam came under fire for repeatedly defending a policy document published by China's State Council that said "loving the country" was a basic requirement for city administrators, including judges. Lam also told a radio station of his admiration for the "great" Communist Party of China.
Concern over Beijing's attempts to increase control over Hong Kong's legal system, which is based on English law, has escalated amid an intense debate about democracy and universal suffrage in the next city-wide elections in 2017.
Hong Kong has become increasingly polarised, with one side threatening to lock down the Central business district unless Beijing grants a fully democratic election. Pro establishment forces have marched against such a move, saying civil disobedience will harm Hong Kong's reputation.