Vienna - A supreme court ruling published on Wednesday means that for the first time ever in Austria, a marriage between two people of the same sex has officially taken place.
The case involved a man who underwent a sex change.
He then applied to be retroactively entered as a woman in the official register of births.
In the first instance, the Interior Ministry refused on the grounds that the plaintiff was married.
Same-sex marriages are banned in predominantly Catholic Austria.
The plaintiff - not named in the reports - then took the case to the supreme Constitutional Court.
Its ruling on Wednesday overturned the Interior Ministry's decree.
It said that re-registration of a birth - needed for passports and social security documents - could not be prevented by the fact that a marriage existed.
The result of the ruling is the official existence of an unprecedented marriage of two women - at least for the time being.
The court left it open whether the change of sex, and resulting same sex of the two married partners, "changes anything in the continuation of the marriage, brings about, makes possible, or forces, its dissolution."
The interior ministry, run by the conservative People's Party (VP), said it would study the details of the ruling.
The justice ministry, under Alliance for the Future of Austria (BZ) Minister Karin Gastinger, said the court had confirmed its line.
It was referring to Gastinger's recent initiative for legally anchored homosexual partnerships, which was rejected by her senior coalition partner VP.
A legal group representing homosexuals welcomed the ruling, which had finally lifted "forcible divorce" for married couples where one of the partners had had a sex change.
The group estimated there were between 20 and 50 couples in Austria which could benefit by the ruling.
The group's lawyer, Helmut Graupner, said the couple in question had continued to live "happily with their two children," even after the male partner's sex change two years ago.
The homosexuals' organisation of the opposition Social Democrats condemned the conservative-led government's "homophobia," which the supreme court had had to correct. - Sapa-dpa