Australia’s highest court has reversed a law allowing the country’s first ever gay marriages, less than a week after dozens of couples used the brief window of opportunity to tie the knot.

Around 30 same-sex couples came to Canberra for ceremonies after the region’s Australian Capital Territory (ACT) passed a law allowing them to do so from Saturday.

Yet their marriages have now effectively been nullified by the country’s High Court, which ruled that the law change was never valid in the first place.

Federal government lawyers issued the legal challenge, saying that it was only up to nationwide lawmakers to decide on the definition of marriage – set in 2004 as being between members of the opposite sex.

The government also argued that to allow regional legislators the power to set their own marriage laws would create confusion and inconsistency.

The High Court today unanimously ruled that the ACT's law could not operate concurrently with the federal Marriage Act, a decision which the same-sex newlyweds said they found disappointing but not surprising.

Ivan Hinton, who married his partner Chris Teoh on Saturday, said it had been “an unprecedented and historic opportunity”.

“I wouldn't have missed it for the world,” he said. The couple only received their marriage certificate yesterday, and immediately applied to change their surnames to Hinton-Teoh. Mr Hinton said he doesn't regret going through with the wedding, and will always consider Mr Teoh his husband.

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.

Alan Wright, who married his partner Joel Player just minutes after midnight on Saturday, said the court's decision had inspired him to fight even harder for equality and focus his efforts on getting the federal government to change the law.

“I am now immensely proud to be part of a very unique, committed and courageous group of people, who — despite probably deep down knowing that it was going to be overturned ... still stood up and said 'no, we're going to do this',” Wright said. “In 10 years' time, I will look back at this as being a very proud moment.”

Darlene Cox married partner Liz Holcombe on Saturday, and told ABC News: “I have to say the weekend was so fabulous that it's taken the shine off, but we're still walking on air.”

Ms Cox said she was not angry with the High Court ruling. “Laws are put up and people change them, it's fine, it's actually part of the democratic process,” she said.

“You've got to respect the process. I think the responsibility is now on the federal government. If they were so sure that they needed to challenge the legislation, let's make sure marriage equality is on the national agenda.”

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.