A gay man in central China has successfully sued a mental hospital over the use of forced conversion therapy.
Activists are hailing the win as the first such victory in a country where the LGBT rights movement is gradually emerging from the fringes.
A court in Zhumadian in Henan province ordered a city mental hospital to publish a public apology in local newspapers and pay the 38-year-old man 5,000 yuan in compensation, according to a copy of the June 26 judgment seen by The Associated Press.
The man, with the surname Yu, had been forcibly admitted to the institution in 2015 by his wife and relatives and diagnosed with "sexual preference disorder", court documents show. He was forced to take medicine and receive injections before finally walking free after 19 days.
In its relatively narrow ruling, the court did not weigh in on the practice of gay conversion therapy or account for Mr Yu's sexual orientation. The court said forcing Mr Yu into a mental institution if he did not pose a danger to himself or others amounted to "infringing on the plaintiff's right to individual freedom."
Mr Yu's lawyer expressed satisfaction with the outcome but declined to discuss the case, saying his firm asked him not to speak to the media. Mr Yu declined to comment.
China removed homosexuality from its list of recognised mental illnesses more than 15 years ago, but stories are rife of families admitting their relatives for conversion therapy.
Gay rights activists say the case marks the first victory against a public mental institution for compulsory therapy against a patient's will. In 2014, a Beijing man named Peng Yanhui checked himself into a private conversion clinic to investigate its advertised electroshock treatments.
Mr Peng, a gay rights activist, then sued the clinic and won a £386 decision from a Beijing court for the suffering he endured in treatment.
The recent ruling in Zhumadian "confirmed the illegality of forced treatments", Mr Peng told the AP. "It's time for China to enact laws to prohibit forced gay conversion therapy."
While few Chinese have religious objections to homosexuality and homophobic violence is rare, the country's authoritarian politics and conservative society's preference for marriage and childbearing create subtle barriers that keep most gays in the closet.
Vibrant gay scenes do exist in a few large cities including Shanghai, which has an annual gay pride parade, and depictions of same-sex relationships are increasingly seen in Chinese films and television. China's internet censors have also tolerated increasingly open debate about LGBT issues.