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.”

The court recommended that marriage be opened to all couples starting in 2019, unless Austrian lawmakers change legislation to stipulate otherwise.

With the ruling, Austria becomes the 16th European country to grant marriage equality. A similar law took effect in neighboring Germany in October. The Netherlands was the first country to approve marriage equality; same-sex couples have been marrying there since 2001. Same-sex marriage has been legal across the United States since 2015.

“Today is a truly historic day,” said Helmut Graupner, a lawyer who represented the two women who brought the case before the court.

Other European countries — including Hungary, Italy and the Czech Republic — allow same-sex couples the right to enter into civil partnerships, which grants them many rights equivalent to those of married couples, as was the case in Austria.

But many other European countries in the formerly Communist east — including Bulgaria, Poland, Romania and Slovakia — still deny homosexuals the right to enter into any legally recognized union.

The Austrian People’s Party — whose leader, Sebastian Kurz, won a general election in October and is expected to be sworn in as chancellor in the coming weeks — said it would accept the ruling.

But their potential partners in government, the far-right Freedom Party, criticized the ruling. They said it disrespected the tradition of marriage as a partnership between a man and a woman that is intended for procreation.

“Now there is equal treatment for something that’s not equal,” Herbert Kickl, the party’s secretary general, said in a statement.

Dismay at the ruling also came from Roman Catholic Church leaders in Austria, who denounced the court for “negating the uniqueness” of marriage “which is based on the differences between the sexes.”

The archbishop of Vienna, Cardinal Christoph Schönborn, told the news portal of the Roman Catholic Church in Austria, Kathpress, that he remained hopeful the ruling would at some point be overturned.

“I am confident that in the long term, a view to the order of creation, which humans cannot disregard without coming to harm, will be established once again,” he said.