Dozens of gay rights demonstrators have been arrested in the Russian city of St Petersburg, after attempting to hold a gay pride rally.

The demonstration was deemed to have broken a law passed this week, which forbids “homosexual propaganda”, and around 40 people were arrested.

The new law prohibits public displays of homosexuality.

Prior to the arrests, around 200 nationalists had gathered, and chanted slogans like: “Sodomy will not pass”, and threw eggs and rocks at the gay rights activists.

The state-run Itar-TASS news agency quoted an unnamed police official who said police arrested dozens of people, including eight of the nationalists.

The upper house of the Russian Parliament voted on Thursday to approve both a bill banning adoption of Russian children by foreign same-sex couples and the nationwide anti-”propaganda” bill banning the promotion of “non-traditional” relationships to minors.

Earlier this month the Duma, or lower parliamentary house, unanimously voted 443-0 to approve the draft law on adoption, as well as related amendments to Russian family law. The bill bans foreign same-sex couples and unmarried individuals in countries where same-sex marriage is legal from adopting Russian children.