Australia’s highest court struck down a landmark law on Thursday that had begun allowing the country’s first gay marriages, shattering the dreams of more than two dozen same-sex newlyweds whose marriages will now be annulled less than a week after their weddings.

The federal government had challenged the validity of the Australian Capital Territory’s law that had allowed gay marriages in the nation’s capital and its surrounding area starting last Saturday.

The federal government’s lawyer had argued that having different marriage laws in various Australian states and territories would create confusion. The ACT, which passed the law in October, said it should stand because it governs couples outside the federal definition of marriage as being between members of the opposite sex.

The High Court unanimously ruled that the ACT’s law could not operate concurrently with the federal Marriage Act, which was amended in 2004 to define marriage as between a man and a woman.

“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,” the court said in a statement issued alongside its ruling. “That Act is a comprehensive and exhaustive statement of the law of marriage.”

Rodney Croome, national director of the advocacy group Australian Marriage Equality, said his group knows of about 30 same-sex couples who have married since Saturday, though the actual number may be slightly higher. The court decision essentially nullifies their marriages, as it means the ACT law under which they were wed was invalid.

Outside the court in Canberra, a tearful Mr. Croome, flanked by several same-sex couples who were married in the past week, said the ruling was a defeat for marriage equality but there had been a greater victory this week.

“And that victory was the nation saw for the first time, I believe, what is really at the core of this issue they’ve seen that marriage equality is not about protest or politics or even about laws in the constitution, ultimately. Marriage equality is about love, commitment, family and fairness,” Mr. Croome said.

In its decision, the court wrote that the federal government is responsible for deciding whether same-sex marriage should be legalized. The ruling means that no Australian state or territory can make that decision, said Sydney University constitutional lawyer Anne Twomey.

Lyle Shelton, managing director of Australian Christian Lobby, which opposes same-sex marriage, praised the court ruling and said common sense had prevailed.

As for the ruling’s impact on the newly-wedded couples, Shelton said it was “really sad that they were put in a position” in which they were allowed to marry before the court handed down its judgment.

Prime Minister Tony Abbott opposes gay marriage and his coalition blocked two federal bills last year that would have allowed legal recognition of same-sex partnerships.

The ruling comes a day after India’s Supreme Court struck down a 2009 lower court decision to decriminalize homosexuality.

Gay marriage has legal recognition in 18 countries as well as 16 U.S. states plus the District of Columbia.

More In: World | International | News