The High Court of Australia has ruled against legislation that allowed 27 same-sex couples to marry in the Australian Capital Territory, noting that the country's federal laws only allow heterosexual marriage.
"The Court held that the object of the ACT Act is to provide for marriage equality for same sex couples and not for some form of legally recognized relationship which is relevantly different from the relationship of marriage which federal law provides for and recognizes," the high court wrote on Thursday.
"Accordingly, the ACT Act cannot operate concurrently with the federal Act."
The ACT parliament had previously moved to legalize same-sex marriage weddings in October, BBC News reported, making it the first Australian territory to do so. Twenty-seven gay couples married, but the high court's decision means that their marriages are no longer valid.
Gay marriage remains banned in Australia and last year a bill seeking to change the traditional definition of marriage failed to receive enough support in both houses of parliament.
Gay rights groups said they will continue fighting to change the definition of marriage.
"This is devastating for those couples who married this week and for their families," said Rodney Croome, the national director of the advocacy group Australian Marriage Equality, according to CNN. "However, this is just a temporary defeat."
"In less than a week we've been married and we've been unmarried, at least on a legal level," added Ivan Hinton, who had married his partner, Chris Teoh, on Saturday.
"We're still married," he added. "I've made commitments to Chris to spend the rest of my life with him."
The Australian Christian Lobby has welcomed the high court's decision to uphold marriage laws across the country, noting that the ruling shows that it is not the jurisdiction of states to legislate in regards to marriage.
"It's important for marriage laws to continue to be administered federally – this is why the Marriage Act was passed in 1961 to have uniform marriage laws," said Managing Director Lyle Shelton.
"Marriage between a man and a woman is good for society and beneficial for governments to uphold in legislation. It's about providing a future for the next generation where they can be raised by their biological parents, wherever possible."
Shelton admitted that it is understandable that same-sex couples who married will be disappointed to find out that their unions are no longer legally valid, but said that the gay marriage debate has received considerable attention in the parliament in the last few years.
Earlier this month, a national referendum in Croatia also went against the recent trend of victories for gay marriage advocates, with 65 percent of national voters affirming that marriage is a matrimony between a man and a woman.
"Marriage is the only union enabling procreation. This is the key difference between a marriage and other unions," Croatian Cardinal Josip Bozanic told followers.