MOSCOW, Oct 26 (Thomson Reuters Foundation) - In an unexpected victory for gay rights, the first minor to be charged in Russia for promoting homosexuality won a court appeal on Friday in defence of his right to post photos on social media of men embracing.

Maxim Neverov was fined 50,000 rubles ($760) in August after a commission on juvenile affairs found him guilty of "promoting non-traditional sexual relationship among minors".

He had posted online photos of shirtless men openly hugging in a nation where gays face legal challenges and risk widespread discrimination.

After an appeal in the city court of Biysk and several hearings, a judge found there was not enough evidence to establish Neverov's guilt and overturned the fine.

"It was totally unexpected," Neverov, 16, told the Thomson Reuters Foundation in a telephone interview immediately after the court hearing.

He said he had been prepared to lose the decision.

"I had a draft of a social media post ready saying 'the court upheld the decision and that we're ready to continue fighting for justice' when the judge announced the ruling," he said.

The prosecutor's office in Biysk, Neverov's hometown in Siberia, could not be reached for comment. It was not clear if an appeal, which must be lodged within 10 days, would follow.

Neverov was the first minor - age 18 or under in Russia - to be fined under the law, which makes illegal any event or act regarded by authorities as an attempt to promote homosexuality to minors.

It has been used to stop gay pride marches and to detain gay rights activists.

Neverov's lawyer Artyom Lapov, a member of the gay rights group Russian LGBT Network, said the ruling is "a signal to the LGBT community that they can, and should, fight for their rights."

In Russia, "people often think that there's nothing they can achieve, but this case shows that they, in fact, can and should," he told the Thomson Reuters Foundation.

"There are precedents, but they are really rare," she said. "This case shows that the justice system is aware that the implementation of the [gay propaganda] law often goes too far."

Russia was ranked Europe's second least LGBT-friendly nation in 2016 by ILGA-Europe, a network of European LGBT groups.

Homosexuality was a criminal offence in Russia until 1993 and classed as a mental illness until 1999.

Last year, the European Court of Human Rights ruled that the Russian gay propaganda law breached European treaty rules, violated the right to freedom of expression and discriminated against LGBT people - a ruling Moscow called unjust.