Image copyright AP Image caption Yang Teng, also known as Xiao Zhen, was reimbursed costs but not awarded damages

China has ordered a psychiatric clinic to pay compensation to a gay man who was given electric shocks in an attempt to make him heterosexual.

The man, Yang Teng, said a Beijing court had decreed that the Xinyu Piaoxiang clinic would have to pay him 3,500 yuan ($560; £400).

The decision has been hailed as a legal milestone by gay rights bodies.

Homosexuality has not been classified as a mental illness in China since 2001 but anti-gay prejudice remains common.

Mr Yang said the procedure involved him being told to have sexual thoughts about men at the same time as receiving electric shocks.

He said that there were also attempts at hypnosis and that the procedures harmed him both mentally and physically.

'Societal pressure'

Mr Yang, also known as Xiao Zhen, told reporters he had agreed to the therapy following pressure from his parents.

However, he previously told the BBC that he underwent the treatment in order to gather evidence for the court case.

"I'm going to take this verdict and show it to my parents so they can see a Chinese court said homosexuality isn't a mental illness," Mr Yang told AFP.

"Someone needs to step up because we must stop such severe transgressions," he added.

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

The court did not immediately respond to requests for comment from the media. However, Mr Yang and his lawyer have briefed several journalists.

The amount awarded by the court did not cover damages for Mr Yang, but did reimburse his "treatment" costs, reports said.

Analysts suggest that attitudes towards homosexuality in China have been slow to evolve because of the one-child-policy as well as heavy societal pressure on young people to get married and produce a family heir.

Correspondents say attitudes are changing however, with an annual gay pride event taking place in Shanghai.