Slovenia has become the 11th country in the European Union to allow marriage between same sex couples, who are also now legally allowed to adopt children, just three years after a similar law was rejected in a referendum.

The Slovenian parliament passed the law by a comfortable 51 to 28 votes, although the law was fiercely protested by two center right opposition parties and various interest groups.

“This will be a step towards a truly patient and inclusive society which Slovenia enters the twenty-first century,” Matej Tasner Vatovec of the center-left party United Left, which tabled the law, told parliament before the vote.

One of the groups, which opposed the law, the Civil Initiative for Family and Children’s Rights, said Wednesday that it would try and push for a referendum to oppose the law. Slovenia rejected a similar proposal in a referendum in 2012.

But this is unlikely to succeed, because Slovenia changed the law in 2013, which prohibits referendums on issues of human rights.

Slovenia’s neighbor Croatia, and another country of the former Yugoslavia, rejected gay marriage and adoption in a referendum in 2013, although couples can register their partnerships.

A number of European Union countries including Britain, Spain and France have recentlyrecognized same sex marriages, although they remain a divisive issue within the more conservative members of the EU.

There are now 21 countries worldwide, which allow same sex marriages.