Gay weddings moved a step closer on Monday evening after David Cameron was forced to accept Ed Miliband's help to defeat an attempt by backbench Tory MPs, who complained about the "aggressive homosexual community", to derail the legislation.
Anti-gay marriage Conservatives had tabled an amendment to the Marriage (Same Sex Couples) Bill that, if passed, would have introduced civil partnerships for heterosexuals at the same time as gay marriage.
However the government had warned that to do so could cost up to £4bn and significantly delay the implementation of the entire bill. A vote in the Commons saw the amendment overwhelmingly defeated by 375 votes to 70.
Pro-gay marriage campaigners cautioned MPs that the amendment, tabled by Tim Loughton, was a cynical attempt to kill the legislation rather than a genuine desire to allow straight couples to have civil partnerships in the interets of equality.
On Monday morning it appeared as if Loughton and his colleagues would be successful after the Labour Party, which backs gay marriage, indicated it would vote with the Tory backbenchers to defeat the government and secure equal civil partnerships.
However Labour's shadow equalities minister Yvette Cooper came to an agreement with culture secretary Maria Miller that will see the government launch a consultation into expanding civil partnerships without the risk of scuppering the gay marriage bill.
Following the vote Miller said: "We are pleased that the House has accepted our amendment offering a review of civil partnerships. We feel that a review is the right way forward, and that no changes should be made to civil partnerships without being fully thought through."
Writing for The Huffington Post UK, the culture secretary said the Conservative Party should be "proud" to enact gay marriage.
"Far from being a radical departure, equal marriage is simply one more in a long line of reforms which have strengthened marriage, ensuring it remains as relevant to our society as it ever was," she said. "Marriage embodies the principles of love, loyalty and commitment - all vital components of a strong society. Marriage brings stability and it binds us together. It makes our families stronger."
But many Tory MPs sat behind her in the Commons disagreed. Former Tory defence minister Sir Gerald Howarth suggested gay rights had gone too far. He criticised the "aggressive homosexual community" who he said saw gay marriage as "a stepping stone to something even further".
And Conservative Edward Leigh said the gay marriage bill was an example of the "outlandish views of the loony left" having taken over the government.
Gay marriage has split the Conservative Party down the middle. And some of its most vocal advocates as well as its most strident critics come from the Tory benches.
Former Conservative police minister Nick Herbert attacked anti-gay marriage Tory MPs who voted for the Loughton amendment for displaying "a faux attchment to equality".
"There are people who are breathing the word equality for the first time. It sticks frankly in the craw of many of us to be lectured about equality by a whole group of people who have been opposing this bill and opposing equality including civil partnerships," he told the Commons.
The vote came as a new poll from Survation showed Ukip trailing the Conservatives by just two per cent. The survey put the Tories on 24%, down five points, Labour on 35%, down one point, the Liberal Democrats on 11%, down one point, and Ukip on 22%, up six points.
The squeeze in suport for the Tories came as David Cameron tried to quell anger in the grassroots of his party over reports the co-chairman of the party, Lord Feldman, described activists as "swivel-eyed loons" who forced MPs to adopt hardline stances.
The peer, who was not named in newspaper reports, was forced to deny making the comments after intense internet speculation.
In his letter the prime minister wrote: "We have been together through good times and bad. This is more than a working relationship; it is a deep and lasting friendship."
"I am proud to lead this party. I am proud of what you do. And I would never have around me those who sneered or thought otherwise. We are a team, from the parish council to the local association to Parliament, and I never forget it."
MPs will hold a second day of debate on the gay marriage legislation on Tuesday before it moves to the House of Lords.