Image copyright AFP Image caption Homosexuality was considered a mental disorder in China until 2001

Gay rights activists in China are preparing for what they say could be a legal milestone in their fight to stop homosexuality being treated as an illness.

Later this month, a Chinese court will hear the first case of its kind brought against a clinic that offers so-called "gay conversion therapy".

A long campaign in Europe and America has been successful in shifting the medical consensus against such treatment, and now campaigners want Chinese doctors to follow suit.

In an office block in the eastern city of Nanjing, down a gloomy corridor, I find the Nanjing Urban Psychiatric Consultancy Centre.

It's a small office with a sparsely-furnished treatment room upstairs, from which - seemingly prompted by our arrival - a young male patient hurriedly leaves.

Image caption Dr Zhou claims to have successfully "cured" 70% of his gay patients

China declassified homosexuality as a mental illness well over a decade ago, but clinics like this one are still easy to find.

Dr Zhou Zhengyou shows me some of the books he's written on the subject over the course of his career.

One of them is a guide for parents who suspect their son or daughter might be gay.

The overriding message appears to be that it is their own parenting methods that are somehow to "blame".

Dr Zhou now claims to cure up to 70% of his gay patients, although he says it is a long and difficult process.

And, his critics point out, at $120 (£70) a session - a lot of money on an average Chinese wage - long and difficult can mean lucrative.

Dr Zhou tells me that today he uses counselling alone and does not treat his patients with so-called aversion-therapy offered elsewhere in China. But he is happy to describe how it works.

"One common method is electric shock. When the patient has a gay thought, we electrocute them or inject them with drugs that make them sick," he said.

Image copyright AFP Image caption Gay pride parades have taken place in Chinese cities, including neighbouring Hong Kong

Image copyright AFP Image caption Chinese gay activists have begun taking bolder actions to gain support and acceptance

Legal challenge

China's gay community has begun to fight back. They've organised a number of protests - small in number but nonetheless brave in China.

Video footage of one demonstration shows activists holding up a protest banner at a Beijing medical conference. "Being gay is not an illness," it reads.

The delegates do not seem convinced. "We cannot support homosexuality," a doctor said. "Although we try to understand it," his colleague adds.

In addition to such direct action, the campaigners have been given another avenue to pursue.

Image caption In March, activist Xiang Xiaohan challenged a government decision not to register his gay rights organisation

For the first time, China has allowed them to challenge gay conversion therapy in the courts.

"I had electric shock therapy only once," the man bringing the case, who calls himself Xiao Zhen, told the BBC. "Imagine those who've had it many times."

He put himself through the treatment in order to gather the evidence and he's now hoping that a successful court ruling in his favour will effectively ban the practice.

It's a battle that has been fought elsewhere, of course.

Image copyright AFP Image caption Government plans to introduce "gay conversion" therapy in Hong Kong drew outrage in 2011

Aversion therapy has been the target of campaigners in Europe and America for decades and today, the notion of the gay conversion has not completely gone away.

But the modern medical consensus in the West is that there's no good evidence that sexual orientation can be changed.

Some people suggest that attitudes in China have been slower to evolve because of the one-child-policy as well as heavy Confucian pressure on young people to get married and produce a family heir.

Attitudes in China, though, are changing fast - that Shanghai now holds an annual gay pride event is proof of that. It includes gay film screenings, discussion groups and a fun-run.

Being China, participants are not allowed to march.

Now the court case, it's hoped, will be another step forward, sending a message that the enduring medical prejudice needs to stop.