Slovenia has officially legalised same-sex marriage and adoption, making it the first Eastern European country to do so.

The amendment was passed on 4 October by the country’s parliament, with 48 MPs in favour, 29 against and one abstaining.

“With these changes, we are recognising the rights of same-sex couples that they should have had for a long time,” State Secretary Simon Maljevac said as he presented the amendment to his colleagues.

The changes come after a ruling from Slovenia’s top court in July, which said that banning same-sex marriage and adoption violated the country’s constution as it prohibits discrimination.

It reached the decision by a 6-3 ruling on each issue.

According to the Slovenian Press Agency, it stated that the ban “cannot be justified with the traditional meaning of marriage as a union between a man and a woman, nor with special protection of family.”

Most of Slovenia’s neighbouring countries, such as Hungary, do not permit civil unions or same-sex marriages.

Up until now, those in a same-sex relationship were only able to join together in a civil union, which did not give them the full rights enjoyed by married heterosexual couples.