Six of the nine judges in the court voted in favour of the verdict. Parliament has six months to pass a law legalizing these matters, but until then same-sex couples are already allowed to marry and adopt.
The Slovenian government hopes to have a law that regulates everything within two weeks. The centre-left Freedom Movement, the largest party in the Slovenian parliament, welcomes the ruling. Prime Minister Robert Golob's party won the election last April against right-wing populist Janez Jansa, who was previously in power. The responsible minister, Luca Mesec, says he will be "pleased" to introduce the law.
With the ruling, Slovenia is the first former communist country in Europe to legalize same-sex marriage. Other Eastern and Central European countries do have a registered partnership.