STRASBOURG/MOSCOW (Reuters) - The European Court of Human Rights ruled that a Russian law banning what it describes as the promotion of homosexuality to minors breached European treaty rules, but Moscow said it would appeal what it called an unjust decision.

FILE PHOTO: Anti-gay protesters try to tear a rainbow flag during an LGBT (lesbian, gay, bisexual, and transgender) community rally in central Moscow, Russia, May 30, 2015. REUTERS/Maxim Zmeyev

Under the legislation, any event or act regarded by the authorities as an attempt to promote homosexuality to minors is illegal and punishable by a fine. The law has been used to stop gay pride marches and to detain gay rights activists.

The Strasbourg court ruled the law violated people’s right to freedom of expression and discriminated against gay people.

“The Court found in particular that, although the laws in question aimed primarily at protecting minors, the limits of those laws had not been clearly defined and their application had been arbitrary,” the court said in a statement.

“Indeed, by adopting such laws, the authorities had reinforced stigma and prejudice and encouraged homophobia, which was incompatible with the values of a democratic society.”

The ruling is likely to strain already poor relations between Russia and the Strasbourg-based court, which last year said Moscow had violated the European Convention on Human Rights in all but six of its 228 judgments in Russian cases.

Russian Foreign Minister Sergei Lavrov dismissed allegations that Russia prosecuted gay people.

“On LGBT (lesbian, gay, bisexual and transgender), we do not prosecute for this or that orientation,” he told a joint news briefing with French Foreign Minister Jean-Yves Le Drian in Moscow.

“TRADITIONAL VALUES”

Pro-Kremlin politicians and Orthodox Church leaders saw the ruling as an attempt to foist what they call unacceptably liberal “European values” on a country whose leaders constantly emphasize the need to adhere to “traditional values”.

“The decision ... shows that our country has chosen the right path to preserve its culture and human identity,” Vitaly Milonov, a lawmaker from the ruling United Russia party, said in an article on his website.

“I’m sure that we will support the institution of a traditional strong family in future and shield children from attacks by all manner of minorities.”

Homosexuality in Russia, where the influence of the socially conservative Orthodox Church has grown in recent years, was a criminal offence until 1993 and classed as a mental illness until 1999.

The Russian Justice Ministry said in a statement it did not agree with the court and pledged to appeal the ruling within three months. It said the law was solely designed “to defend morality and children’s health” and did not amount to a ban or public condemnation of homosexuality.

Human rights defenders say the contested law has been broadly applied to intimidate Russia’s LGBT community, however.

Tuesday’s case was originally brought by three Russian gay rights activists who were fined for holding banners designed to encourage acceptance of homosexuality, between 2009 and 2012. The court ordered Russia to pay them thousands of euros in damages.

Nikolai Alekseyev, one of the activists, said in a statement the ruling was “a historic victory” that he pledged to use to urge the Russian authorities to scrap the law.

“The way this law has been applied shows that it is not aimed at protecting minors, but at removing LGBT people, an enormous social group, from the public space, and at stripping them of their right to speak out or fight for their rights,” he said.