LONDON — The House of Commons voted overwhelmingly Tuesday to approve a bill legalizing same-sex marriage in Britain, indicating that the bill is assured of passage as it moves through further legislative stages.
But in a major setback for Prime Minister David Cameron, who championed the bill, it appeared that more than half of the lawmakers in his Conservative Party voted against the measure or abstained.
After a six-hour debate, the Commons vote was 400-175 for the bill. It will have to pass in the House of Lords, where delaying tactics by opponents are possible, but Cameron has said that he plans to have the bill enacted into law sometime this summer.
Although 132 of the 303 Conservative lawmakers voted for the bill, early calculations by opponents within the party were that up to 170 or 180 others in the party had broken with the prime minister, 140 by voting against the bill and up to 40 others by abstaining.
In modern times, few prime ministers have faced such an extensive rebellion in their own ranks, and the outcome seemed likely to add to the growing ferment among backbench Conservatives about Cameron’s leadership on a wide range of issues, including Britain’s shrinking defense budget and its increasingly uneasy ties with the European Union.
The divisions over same-sex marriage have been less vehement in Britain than they have been in France, where a similar bill backed by President Francois Hollande has prompted rival demonstrations in Paris recently that have drawn tens of thousands into the streets. Discussions in the French Parliament have been equally impassioned, where a marathon debate on the issue, now in its second week, has featured insults across the floor of the National Assembly and more than 5,300 amendments.
By comparison, the debate in the House of Commons was mostly understated, with a strong undercurrent of realism among lawmakers who oppose gay marriage but sense that the battle is already lost, not only in the crushing parliamentary majority favoring change but in a wide variety of opinion polls that have shown strong public support for the measure put forward by Cameron.
Nonetheless, some Conservative lawmakers added a strident note to Tuesday’s debate. Sir Roger Gale, a right-wing backbencher, pulled no punches.
‘‘It is not possible to redefine marriage,’’ he said. ‘‘Marriage is the union between a man and a woman, has been historically, remains so. It is Alice in Wonderland territory, Orwellian almost, for any government of any political persuasion to seek to come along and try to rewrite the lexicon. It will not do.’’
Cameron is trying to modernize the Conservatives, and to position the party for 2015, when it will have to battle against a resurgent Labor Party riding high in the polls and strongly in favor of same-sex marriage, as is the third major party in British politics, the Liberal Democrats.
Although Cameron played protagonist for the bill before British lawmakers, and risked adding momentum to a restiveness about his leadership among right-wing Conservative backbenchers, he was not among the 70 or so members of the House of Commons who spoke in the debate Tuesday.
But he addressed reporters earlier at 10 Downing St., where he had been holding talks with Vice President Joe Biden. ‘‘Today is an important day,’’ he said, before heading for the Commons to cast his vote. ‘‘I am a strong believer in marriage. It helps people commit to each other, and I think it is right that gay people should be able to get married, too.’’
The legislation, which applies to England and Wales, would permit civil marriage between same-sex couples but specifically exempt the Church of England and other faiths from an obligation to perform such ceremonies.