LONDON — Russia’s prohibition of what it considers the promotion of homosexuality is discriminatory and violates freedom of expression, Europe’s top human rights court ruled on Tuesday, in a strong rejection of laws that rights groups say have been routinely used as cover for abuse and violence.

Homosexuality was decriminalized in Russia shortly after the fall of the Soviet Union, but gay, lesbian, bisexual and transgender people are often subject to discrimination, persecution and worse.

The prohibition, codified in national law in 2013, has been seen as a central plank of President Vladimir V. Putin’s nationalist message, one that has positioned Russia as a defender of Christian and traditional values, and the West as decadent and godless.

Ruling in favor of three gay activists, the European Court of Human Rights found that “the very purpose of the laws and the way they were formulated and applied” was “discriminatory and, over all, served no legitimate public interest.” It ordered Russia to pay the men a total of 43,000 euros, or $48,000, in damages.