A bill to legalise gay marriage in Britain has passed a crucial hurdle in parliament, despite efforts by the majority of politicians from Prime Minister David Cameron's Conservative party to wreck the plans.

Members of the House of Commons on Tuesday voted by 366 to 161 in favour of the same sex marriage bill, which will now go to the country's upper house for consideration.

The bill is likely to face strong opposition when it is debated in the House of Lords next month, especially from the 26 bishops holding seats in the assembly.

Cameron was forced to make a deal with the opposition Labour party to pass the bill as many members of his own party had looked to prevent it from passing.

Some more right-wing Tories had proposed an amendment to allow heterosexual couples to form civil partnerships, which was condemned by Cameron's office as a "wrecking amendment" that would have delayed the introduction of the new law.

Although the motion was easily defeated with Labour's help, the depth of the Conservatives' division was made clear when it was revealed that 128 of its MPs had voted against the bill, 11 more than voted in favour.

The action marks the second revolt of its kind on gay marriage.

Another proposed amendment would have given registrars the right to refuse to perform gay marriage ceremonies if they objected.

Conservative rift

Cameron's failure to unite his party over gay marriage and his other major policy - renegotiating Britain's membership of the EU - risks undermining his chances of being re-elected in 2015, even as the economy is showing some signs of returning to growth.

Britain has seen none of the mass protests over gay marriage held across the channel in France, which last weekend became the fourteenth country in the world to legalise it, but some protesters did gather outside the House of Commons while the bill was debated on Monday.

About 54 percent of Britons are in favour of allowing same-sex couples to marry, according to a YouGov poll for the Sunday Times.

Politicians remain divided, with Conservative former minister Norman Tebbit stoking a row on Tuesday by claiming gay marriage could result in a lesbian queen giving birth to an heir by artificial insemination.

"When we have a queen who is a lesbian and she marries another lady and then decides she would like to have a child and someone donates sperm and she gives birth to a child, is that child heir to the throne?" he told The Big Issue magazine.

Many Conservative supporters fear that with a general election two years away, Cameron's backing for gay marriage is driving traditional Tory voters to the UK Independence Party.

The anti-immigration, anti-EU party is a fast-rising force in British politics and made strong gains in local elections last month.

Tim Loughton, the Conservative MP who introduced the amendment critics regarded as an attempt to sabotage the bill, said Cameron's determination to push for gay marriage "hadn't helped" relations with his own party.

"It was a mistake," the MP told the Reuters news agency.