Both parties voted against same-sex marriage when it came before parliament earlier this year.
The distinction between marriage and registered partnership cannot be maintained today without discriminating against same-sex couples....
Austria's Constitutional Court [official website, in German] ruled [text, PDF, in German] Tuesday that a 2009 law that allowed same-sex couples to enter registered partnerships but not to get married was unconstitutional.
Helmut Graupner, a lawyer for the two women who brought the case, wrote in a Facebook post that "today is a truly historic day".
As it now stands, same-sex couples in Austria had been allowed to enter civil partnerships for the last seven years.
The Constitutional Court sided with two women who complained they were refused permission to marry by authorities in the capital Vienna. The court explicitly stated that a ban on same-sex marriage conveys the message that lesbian, gay, or bisexual people are not equal to heterosexuals and concluded that this amounts to discrimination.
Same sex couples have been able to access civil unions since 2010, and in 2013 gained the right to adopt children.
Restrictions on same-sex marriage will expire on December 31, 2018. However, in the state's laws on marriage it had been explicitly stated that only two people of the opposite sex could marry.
Many western European countries have introduced marriage equality.
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.
In Germany, women and men are allowed to Wednesday to a same-sex partner since October.