Russia's "gay propaganda" law is discriminatory and encourages homophobia, the European Court of Human Rights has ruled.
The Strasbourg judges said Russia had discriminated against three gay rights activists who opposed the law. It was adopted in 2013, banning promotion of homosexuality among people under 18.
The law "reinforced stigma and prejudice and encouraged homophobia", the ruling said.
Gay rights groups condemned the law.
Under the law, private individuals deemed to be promoting "homosexual behaviour among minors" face fines of up to 5,000 roubles (£67; $85), while officials risk paying 10 times that amount. Businesses and schools can be fined up to 500,000 roubles.
Homosexuality was decriminalised in Russia in 1993, but anti-gay prejudice is rife.
Critics see the propaganda law as part of a state campaign to marginalise LGBT activists, whose work includes dissemination of sexual health advice.
According to the court, the legislation aimed at curbing promotion of homosexuality was "not clearly defined" and was implemented in an arbitrary way. It "served no legitimate public interest", the court said.
Russia's justice ministry says it will appeal, arguing that the law is aimed "exclusively at protecting the morals and health of children".
MP Vitaly Milonov, of the ruling United Russia party, who introduced the original bill into the St Petersburg parliament and which formed the basis of the federal law, told BBC Russian that the court's decision was "anti-national".
"It is absolutely harmful, and those who set up this decision are enemies of Europe," he said.
The three activists had been found guilty for protesting against the law in 2009-2012 - outside a secondary school in Ryazan, a children's library in Archangel and an administrative building in St Petersburg.
More on gay rights in Russia
The court rejected the Russian government's claim that such a law was needed to protect morality.
It found that the government had "failed to demonstrate how freedom of expression on LGBT issues would devalue or otherwise adversely affect actual and existing 'traditional families' or would compromise their future".
Such laws, the judges said, "embodied a predisposed bias on the part of a heterosexual majority against a homosexual minority".
They ordered Russia to pay each of the activists damages of between €8,000 (£7,000; $8,900) and €20,000.
One of the three, Nikolai Alexeyev, hailed the ruling as a "total victory", the BBC's Sarah Rainsford reports from Moscow.
He had picketed a children's library, holding a sign declaring that gay people could also be great - and listing the Russian composer Pyotr Tchaikovsky and filmmaker Sergei Eisenstein as examples.