Around two dozen people staged a "kissing protest" outside the Kremlin on Tuesday ahead of the vote on the bill against "homosexual propaganda." But the protesters were outnumbered by anti-gay activists and around 20 people were detained in ensuing scuffles, a police spokesman said.
The Duma, Russia's lower house, passed the bill by a vote of 436-0, with the only abstention coming from Ilya Ponomaryov, who has supported gay rights in the past despite objections from his pro-Kremlin party leadership.
The controversial measure imposes heavy fines for promoting "propaganda of non-traditional sexual relations" to minors and staging gay pride rallies.
Individuals who use the Internet or other media for such "propaganda" can be fined as much as 100,000 rubles (2,300 euros, $3,000). Organizations can be fined up to one million rubles and be closed down for a period of 90 days. Foreigners who violate these rules can also be fined 100,000 rubles and detained for as long as 15 days before being deported.
A second bill, passed by a vote of 308-2, punishes "public actions expressing clear disrespect for society and committed to the goal of offending religious feelings of the faithful" with jail terms up to a year and 300,000 ruble fines.
If those acts are committed in a place of worship, punishment is increased to three years in prison and fines as high as 500,000 rubles.
The bill was proposed after members of the band Pussy Riot staged a "punk prayer" against President Vladimir Putin in a Moscow Cathedral last year. The performance sparked uproar among members of the Orthodox Church, who said the band offended the faithful, and targeted Putin and the institution's close ties with the Kremlin.
Both bills need to be passed by Russia's upper house and signed into law by Putin. Both of these steps are seen as formalities.
Observers say the measures are part of government efforts to push back against western liberalism that is seen as contributing to protests against Putin and the Orthodox Church.
Supporters of the laws say traditional Russian values need to be protected and that now churchgoers have the support of the government.
"Those who do not believe in God should not enter churches and especially dance there," said the leader of the ultra-nationalist Liberal Democratic Party, Vladimir Zhirinovsky.
Rights activists, however, have criticized the both bills as promoting intolerance, calling them an example of Putin and the government's crackdown on dissent.
The US-based Human Rights Watch said the anti-gay law "would only raise the level of intolerance in Russian society."