As the lesbian and gay minorities of France, England and Wales celebrate the recent laws permitting same-sex couples to marry, Russia is marching briskly in the opposite direction, with an extreme version of Britain's infamous section 28 that could put athletes at the Sochi 2014 Winter Olympics in jail for up to 15 days.

It is bad enough that Russia refuses to comply with a 2010 judgment of the European court of human rights, Alekseyev v Russia, which requires Moscow to allow the kind of lesbian and gay pride event that is held in most major European cities. But the legal situation was made much worse by a federal law of 29 June 2013, which imposes heavy fines on individuals and NGOs accused of "propaganda of non-traditional sexual relations among minors expressed in distribution of information … aimed at the formation … of … misperceptions of the social equivalence of traditional and non-traditional sexual relations". Prosecutions under the new "propaganda law", which potentially bans any public indication of support for the idea that same-sex and different-sex relationships should be treated equally; and an existing "foreign agents law", could strangle Russia's young lesbian and gay human rights movement.

Russia's "propaganda law" is staggering in its disregard for the founding principles of a democracy: freedom of expression, assembly and association. The most basic right of every lesbian and gay minority in every democracy in the world is to make itself visible and to campaign for legal reforms, by holding peaceful public assemblies and forming associations that seek to persuade the heterosexual majority to change its mind, and stop discriminating against the minority, one law at a time. Governments have an obligation to protect these assemblies and associations from those who find them offensive and threaten them with violence. This is true even in the 75 or more countries that criminalise same-sex sexual activity.

The apparent justification for the law (protection of minors) was rejected by the former European commission of human rights in 1997, in the context of Britain's unequal age of consent, because there has never been any evidence that an individual's sexual orientation is determined by their first sexual experience, let alone mere information, such as the sight of a placard or a rainbow flag at a demonstration. As the European court of human rights observed in Alekseyev: "There is no scientific evidence … suggesting that the mere mention of homosexuality, or open public debate about sexual minorities' social status, would adversely affect children."

What is to be done? All bodies or institutions of the United Nations (building on a decision of the United Nations human rights committee), the Council of Europe, and the EU, as well as all democratic national governments, should be condemning the new law and demanding its repeal in the strongest possible terms. They should do so immediately, or face the prospect of athletes, coaches or supporters being arrested and deported for displaying "propaganda for non-traditional sexual relations" at the Sochi games.

Britain has a special contribution to make. First, David Cameron should confess to President Putin that we passed a similar but less extreme law in 1988 (section 28), which banned "the teaching … of the acceptability of homosexuality as a pretended family relationship". That law, fully repealed in 2003, was a mistake, which Russia should learn from rather than imitate.

Second, before criticising Russia for refusing to comply with the 2010 Alekseyev judgment and for making things worse with its "propaganda law" (which clearly violates the European convention on human rights), Cameron must make sure that he has swept his own doorstep. Since October 2005, the UK has failed to comply with Hirst v UK, a judgment of the European court of human rights requiring us to amend our blanket ban on prisoners voting by granting the right to vote at least to prisoners serving shorter sentences. Cameron is claiming a non-existent "cultural exemption" from article 46 of the convention, because permitting some prisoners to vote, as in at least 75% of European countries, is not part of British culture and makes him feel "physically ill". (In western Europe, Britain now has the only blanket ban on prisoners voting, just as we were the only large western European country with a blanket ban on lesbian and gay members of the armed forces in 1999.) Putin is claiming the same "cultural exemption" from article 46 for lesbian and gay human rights, which he does not see as part of Russian culture.

Ironically, Russia also has a blanket ban on prisoners voting and lost Anchugov v Russia on 4 July 2013. Perhaps Cameron and Putin can start by agreeing that they will both respect the authority of the European court of human rights by amending their rules on votes for prisoners. Then Cameron, having stepped outside his glass house, will be in a position to call on Putin to repeal the "propaganda law", and authorise a lesbian and gay pride event in Moscow in May 2014, and perhaps even in Sochi before that.