BERLIN — Austria joined the ranks of countries recognizing a universal right to marriage on Tuesday, after its highest court ruled that barring same-sex couples from wedding was discriminatory.

The ruling, announced on Tuesday, noted that same-sex couples have increasingly been granted rights equal to those of married, heterosexual couples since civil partnerships were permitted in 2010. Those rights include adoption and support for fertility treatments.

That left sexual orientation as the main difference between those allowed marry and those who could enter only into a legal partnership, which the court found discriminatory.

“Today, the differentiation between marriage and legally registered partnerships can no longer be upheld without discriminating against same-sex couples,” the court said. “For the separation into two legal institutions implies that homosexual individuals are not equal to heterosexuals.”