David Cameron, British prime minister, is facing deepening splits within his Conservative Party, with a divisive bill to legalise gay marriage returning to parliament.

The bill was approved by a comfortable 225-vote majority when it was last debated in February despite the opposition of almost half of Conservative lawmakers.

But dozens of disgruntled Conservative MPs are expected to deliver a blow to Cameron's agenda by backing an amendment saying that if gay couples are allowed to marry, then heterosexual couples should also be able to have civil partnerships.

The government said it was a "wrecking amendment" which could delay the passing of the gay marriage bill by up to two years and cost $6bn in pension changes.

The main opposition Labour Party, while it backs gay marriage, had hinted that it could join the Conservative rebels in backing the amendment because it argues that the government has failed to make a convincing case against extending civil partnerships.

But the government and Labour indicated later on Monday they were ready to work together to defeat the backbench bid to derail the legislation.

'Commitment unwavering'

Ed Miliband, Labour Party leader, said on Twitter that Cameron's "inability to control his party must not be allowed to wreck the Equal Marriage Bill".

He added: "Labour's commitment unwavering".

A source close to Maria Miller, the culture secretary who is responsible for steering the legislation through parliament, said she was "very relaxed" about a Labour proposal for an immediate consultation on extending civil partnerships to heterosexual couples.

The agreement to put the matter to consultation should defuse the Conservative backbenchers' demands and allow the gay marriage bill to proceed to the upper house of parliament, the House of Lords, where it is expected to face stiff opposition.

Legislators are allowed a free vote on gay marriage, meaning they are not required to follow party directions because it is considered an issue of conscience.

Bitterness in ranks

The vote comes at a time when Cameron is already under pressure from a large section of his fractious centre-right party over his stance on a referendum on Britain's membership of the European Union.

Grassroots 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 (UKIP), which had its best electoral performance last month when it made gains in local elections.

A letter signed by more than 30 current and former Conservative local party chairmen and handed to Cameron on Sunday gave a taste of the bitterness in Tory ranks.

They accused him of "treating the membership with contempt" over the issue.

"The bill could cost us the election ... therefore, prime minister, for the sake of the well-being of the country and the integrity and future success of the party, we urge you not to continue with your policy of redefining marriage," it said.

On Saturday, France became the 14th country to legalise gay marriage when Socialist President Francois Hollande signed it into law, despite fierce protests from the main opposition right-wing UMP party.

New Zealand, a member of the British Commonwealth, legalised gay marriage in April.