Same-sex couples in Austria will be allowed to marry by the beginning of 2019, Austria's Constitutional Court has ruled.
Austria's Constitutional Court said that existing laws, allowing gay couples to enter legal partnerships but not marry, were discriminatory.
A ruling published on Tuesday said that restrictions on same-sex marriage will be lifted at the end of 2018 unless the government does so itself earlier.
The court took up the issue following a complaint from two women who were refused permission to enter a formal marriage by authorities in Vienna.
Both gay and straight couples will also be able to enter legal partnerships that fall short of marriage.
In a statement, Austria's Constitutional Court said: "The distinction between marriage and civil partnership can no longer be maintained today without discriminating against same-sex couples."
It added that keeping the two institutions separate suggests that "people with same-sex sexual orientation are not equal to people with heterosexual orientation".