A bill that would replace same-sex marriage with domestic partnerships in Bermuda has been signed into law by the governor of the British island territory.

Gov. John Rankin says he sought to balance opposition to same-sex marriage on the island, which was legalized through a Supreme Court ruling in May 2017, while complying with European court rulings that ensure legal protections for same-sex couples.

The governor says the domestic partnership law grants same-sex couples rights that are "equivalent" to those of heterosexual couples. Opponents say it's unprecedented to strip away the right.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

“Governor Rankin and the Bermuda Parliament have shamefully made Bermuda the first national territory in the world to repeal marriage equality,” Ty Cobb, global director of LGBTQ advocacy group Human Rights Campaign, said in a statement sent to NBC News on Wednesday.

“This decision strips loving same-sex couples of the right to marry and jeopardizes Bermuda’s international reputation and economy. Despite this deplorable action, the fight for marriage equality in Bermuda will continue until the day when every Bermudian is afforded the right to marry the person they love.”

British Prime Minister Theresa May’s spokesman, James Slack, said Thursday that Britain was “seriously disappointed” by the legal change. But he said it would not have been right for Britain to block the move.

He said the bill “has been democratically passed by the Parliament of Bermuda, and our relationship with the overseas territories is based on partnership and respect for their right to democratic self-government.”

Some opposition politicians say the British government should have intervened to prevent the change, which they say discriminates.

A handful of same-sex marriages that took place during the months they were legal in Bermuda will be recognized.

In December, the bill passed both houses of the legislature by wide margins despite concerns it could hurt the tourism industry. Ranking signed the measure Wednesday.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM