Bermuda has become the first jurisdiction to legalise and then repeal same-sex marriage, in what critics have called an unprecedented rollback of civil rights by the British territory.

Bermuda’s governor has signed into law a bill reversing the right of gay couples to marry, despite a supreme court ruling last year authorising same-sex marriage.

Walton Brown, Bermuda’s minister of home affairs, said the legislation signed by Governor John Rankin would balance opposition to same-sex marriage on the socially conservative island while complying with European court rulings that ensure recognition and protection for same-sex couples in the territory.

Bermuda’s Senate and House of Assembly passed the legislation by wide margins in December and a majority of voters opposed same-sex marriage in a referendum.

“The act is intended to strike a fair balance between two currently irreconcilable groups in Bermuda, by restating that marriage must be between a male and a female while at the same time recognising and protecting the rights of same-sex couples,” said Brown, whose ruling Progressive Labour party proposed the repeal.

LGBT civil rights groups said domestic partnerships amounted to a second-class status and it was unprecedented for a jurisdiction to take away the legal right to marriage after it had been granted.

“Governor Rankin and the Bermuda parliament have shamefully made Bermuda the first national territory in the world to repeal marriage equality,” said Ty Cobb, director of Human Rights Campaign Global.

“I feel enormously disappointed,” said Joe Gibbons, a 64-year-old married gay Bermudian. “This is not equality, and the British government has obviously just said, ‘This is not our fight.’”

About half a dozen same-sex marriages that took place in Bermuda between the supreme court ruling in May 2017 and the repeal will continue to be recognised under the new law.

But same-sex couples will now have the option only of a registered domestic partnership. Brown said those couples would had “equivalent” rights to married heterosexual couples, including the right to make medical decisions on behalf of one’s partner.

Human rights groups had lobbied Rankin and the foreign secretary, Boris Johnson, to deviate from standard practice in self-governing UK territories and withhold assent for the change. They argued that the new legislation contradicted Bermuda’s constitution, which guarantees freedom from discrimination.

In a debate in the UK’s House of Commons last month, the Labour MP Chris Bryant called the bill a “deeply unpleasant and very cynical piece of legislation”. After the repeal was confirmed, Bryant tweeted that it would “undermine [the] UK effort to advance LGBT rights”.

So @BorisJohnson has granted permission to Bermuda to abolish same sex marriage. This totally undermines UK effort to advance LGBT rights. — Chris Bryant (@RhonddaBryant) February 7, 2018

The supreme court ruling on marriage equality in May 2017 was celebrated by Bermuda’s small gay community, but it also outraged many on the socially conservative island, including church leaders, and thousands protested outside parliament.

Having signed his assent, Rankin declined to comment beyond a brief statement: “After careful consideration in line with my responsibilities under the constitution, I have today given assent to the Domestic Partnership Act 2017.”

Mark Pettingill, a Bermudian lawyer who won the May 2017 marriage equality case in the supreme court, had previously said he might challenge the governor’s decision through a constitutional action. He could not immediately be reached for comment on Wednesday.

Associated Press and Reuters contributed to this report

• This article was amended on 8 February 2018 to reflect that comments initially attributed by the AP to John Rankin were in fact said by Walton Brown.