The parliament of Slovakia adopted a constitutional amendment prohibiting legal recognition of same-sex couples on Wednesday.

This makes it the third European Union member state to ban same-sex couples from marrying since 2012, bringing the total number of member states with such bans to seven. An explanatory memo that accompanied the bill stated it was also designed to make it "impossible for the rights and duties associated with marriage to be conferred in any way other than a legally recognized union between a man and a woman."

The law was passed overwhelmingly, with the votes of 102 of the 128 members of parliament. The proposal caught LGBT rights activists off guard, because the ruling Social Democrats joined the opposition Christian Democrats in supporting it. The amendment was part of a deal to get through a government-backed amendment reforming the judiciary, which was also adopted in the same vote as the marriage amendment.

"It was really a surprise," said Martin Macko of the Slovakian LGBTI rights organization Inakost. "It never was on the agenda of the ruling party.... Conservatives tried to adopt this amendment before, but it never received too much support."

The drive for the amendment was sparked in December when the Slovakian conference of Catholic bishops issued a pastoral letter decrying same-sex marriage as ""sodomitic mockery" and gender equality as part of "the culture of death." An organization called the Alliance for Family then began collecting signatures for a ballot measure that would ban recognition for same-sex unions, adoption by same-sex couples, and allow parents to withdraw their children from sex-education classes, but instead parliament moved forward with the amendment adopted on Wednesday.

The vote comes in the wake of elections for the parliament of the European Union that saw right wing parties double their numbers, though they only hold around 20 percent of the seats. But the fact that a party on the left of the political spectrum would back such a measure made the vote troubling outside of Slovakia.

Ulricke Lunacek, of the Austrian Green Party who co-chairs the Intergroup on LGBT Rights in the parliament of the European Union, was especially irate that a party on the left like the Social Democrats would sign onto to such a measure. When a marriage amendment advanced in Croatia last year, she said, the country's Social Democrats fought the proposal even though they lost when it went to voters.

It is "just outrageous, that a social democrat ... [would do] a deal with the ultra-conservative Christian Democratic party." She added that she had tried to get Social Democratic politicians in Austria to pressure Slovakian Prime Minister Robert Fico to drop the amendment, but she hadn't gotten much support.

"European parties have to be more vocal in telling their members that things like that are detrimental to their fate," Lunacek said.