LONDON — At a time when support for same-sex marriage seems to be slowly advancing in some parts of the world, legislators in Bermuda have restored a ban on the unions, just six months after the island’s highest court approved them.

The Senate in the wealthy, self-governing British territory voted 8 to 3 in favor of a new law to allow only domestic partnerships for same-sex couples. The vote represented a rare reversal of an international trend broadening the number of jurisdictions that recognize same-sex marriage.

The vote on Wednesday came less than a week after the House of Assembly, the lower house of Parliament, voted 24 to 10 in favor of the same proposal. To take effect, the Atlantic island’s governor, John Rankin, would have to sign the bill into a law, but that is usually a formality.

Most of mainland Britain legalized same-sex marriage in 2014, but Northern Ireland has not followed suit.