As an activist in a nurse's uniform knelt over a patient, wielding a giant needle, the Beijing court began hearing a landmark case on "gay conversion" treatment.
"Homosexuality doesn't need to be cured!" chanted about a dozen supporters. "Haidian Court, oppose conversion therapy!"
Homosexuality was de-classified as a mental disorder in China in 2001 but widespread intolerance toward gays and lesbians remains, and activists hailed the unprecedented case as a significant step forward.
The plaintiff, who is gay and has given his name only as Xiao Zhen, says the Xinyu Piaoxiang clinic in Chongqing traumatised him when he was electro-shocked after being told to have sexual thoughts involving men.
He is also taking action against China's top Internet search engine, Baidu, for running advertisements by the facility.
Those who come out to friends and family in China often face significant pressure to undergo sexuality "treatment" or marry a partner of the opposite sex.
"It's the first case about anti-conversion therapy in China," said Xiao Tie, 28, executive director of the Beijing LGBT Centre, which is backing the legal action.
"In China, most people who undergo 'conversion therapy' do so because they are pressured by their family. Parents, once they realise their child is gay, urge him or her to go to a psychiatric hospital or undergo treatment," she said.
Most people who claim that they have been successfully "converted" by the therapy only say so in order to stop the distressing treatments, she added.
Conversion therapy has more than a century of history around the world, but has fallen out of favour with medical authorities.
Nonetheless the lucrative industry persists in countries from Singapore to Britain and the United States -- where reports of electro-shock use have added to momentum for a ban.
Zhang Rui, 21, who is in charge of the Beijing LGBT Centre's psychological counselling programme, said advocates hope the case will help change Chinese public perceptions of gays as suffering from mental illness.
"We're here to tell even more people that conversion therapy is not scientific," she said. "Homosexuality can't be 'cured.'"