British lawmakers on Tuesday passed a bill legalising same-sex marriage in England and Wales, paving the way for the first gay weddings in 2014.
MPs in the House of Commons decided not to oppose a number of minor amendments to the Marriage (Same Sex Couples) Bill proposed by the House of Lords, the upper parliamentary chamber.
The legislation is now expected to receive official assent from Queen Elizabeth II later this week after MPs agreed to changes such as ensuring protections for transgender couples.
Already on Monday night, jubilant gay rights activists danced outside parliament as the government-backed bill passed unopposed through the House of Lords. Some members there wore pink carnations.
A spokesman for the culture ministry, which is overseeing the new law, told AFP the bill would probably receive royal assent on Wednesday or Thursday.
"But we are looking at seeing the first gay weddings in the middle of 2014 because there are various issues to sort out, such as its impact on pensions," the spokesman added.
Government computer systems also need to be updated to allow same-sex marriages to be registered, at an estimated cost of £2 million ($3 million, 2.3 million euros).
But the government hopes legalising gay marriage will bring an overall boost to the economy, estimating that the change could bring in up to £14.4 million a year for caterers, hotels and the rest of the wedding industry.
The bill survived a stormy passage through parliament, with dozens of members of Prime Minister David Cameron's own Conservative party voting against it.
Tory minister Gerald Howarth criticised the way the government had backed the bill.
"I have to say that it is astonishing that a bill for which there is absolutely no mandate, against which a majority of Conservatives voted against, has been bulldozed through both Houses and just two hours of debate tonight is an absolute parliamentary disgrace," he said.
"I think the government should think very carefully in future if they want the support of these benches. Offending large swathes of the Conservative Party is not a good way of going about it."
An attempt in the Lords last month to kill off the legislation with a "wrecking amendment" failed.
Deputy Prime Minister Nick Clegg, who leads Cameron's junior coalition partners, the Liberal Democrats, said the new law would ensure that gay couples felt "recognised and valued, not excluded".
Gay rights activists have vowed to press on for equal marriage in the United Kingdom's other two nations, Scotland and Northern Ireland.
But opponents of gay marriage have warned that the legislation will "come back to bite" Cameron.
The Coalition for Marriage campaign group said it would mobilise a 700,000-strong support base ahead of next year's European elections and the general election in 2015.
"They are passionate, motivated and determined to fight on against a law that renders terms like 'husband and wife' meaningless," said the group's chairman Colin Hart.
Civil partnerships for gay couples have been legal in Britain since 2005, giving them identical rights and responsibilities to straight couples in a civil marriage.
But campaigners point to differences, such as gay couples' inability to choose a religious ceremony or to call their partnership a "marriage".
The new law will ban the established Churches of England and Wales -- which are opposed to gay marriage -- from conducting ceremonies. That will give them the legal framework they need to be able to refuse to conduct such marriages.
Other religious institutions will be able to "opt in" if they wish.
Scotland and Northern Ireland have their own laws on the matter.
The Scottish government published its own same-sex marriage bill last month, but Northern Ireland's assembly voted to block a similar measure.
France became the 14th country to legalise same-sex marriage in May, joining The Netherlands, Spain, Canada, South Africa, Norway, Sweden, Portugal, Iceland, Argentina, Denmark, Uruguay, Belgium, and New Zealand.
Gay couples can marry in 13 US states, as well as in the capital Washington DC, while parts of Mexico also allow same-sex marriage.