Australia gay marriage verdict
Gay rights activists attend a rally to support same-sex marriage in central Sydney in this file photo. (Reuters) Reuters

The Australian High Court has overturned a law that allowed same-sex marriages in the capital region, saying the federal Marriage Act takes precedence over other pieces of legislation.

Annulling a law passed by the legislative assembly in Canberra that permitted gay marriages, the first such law across the country, the High Court has struck down the legality of same-sex weddings that took place in the five days after its enactment.

"This is devastating for those couples who married this week and for their families ... However, this is just a temporary defeat," Rodney Croome, the national director of Australian Marriage Equality, said in a statement.

According to local media 27 couples had married under the law enacted by lawmakers in the Australian Capital Territory (ACT).

"In less than a week we've been married and we've been unmarried, at least on a legal level," said Ivan Hinton, who had married his partner Chris Teoh on Saturday. "We're still married ... I've made commitments to Chris to spend the rest of my life with him," he told reporters, according to the BBC.

The High Court ruling that outlawed gay marriages in the country was unanimous.

"The Marriage Act does not now provide for the formation or recognition of marriage between same-sex couples. The Marriage Act provides that a marriage can be solemnised in Australia only between a man and a woman," it said.

The court, however, added that it was up to the federal parliament to decide if such marriages were to be allowed. "Whether same sex marriage should be provided for by law is a matter for the federal parliament," the court statement said.

The lawmakers in the ACT were apparently aware that the law would be quashed by courts as it contravened the federal marriage act. But it was a victory for Australian gay rights activists, who now focus on lobbying the national parliament to change the federal law.

However, the campaign would be long and arduous as the conservative ruling coalition of Prime Minister Tony Abbott opposes gay marriages.

The Australian court judgment followed a similar judicial setback for gay rights in Asia when the Indian Supreme Court held that gay sex between consenting adults was a criminal act in the country, shocking rights activists the world over.

However, Australia's neighbour New Zealand legalised same-sex marriages earlier this year, becoming the first country in the Asia-Pacific region to do so.