Gay marriage closer to becoming law after MPs vote strongly in favour of legalising same-sex weddings PM trying to prevent his own MPs wrecking gay marriage legislation Late deal means same-sex marriages could take place next summer PM's reliance on Labour highlights divisions with his backbenchers David Cameron enraged Tory rebels last night by striking a late deal with Labour to prevent his own MPs wrecking gay marriage legislation. The Prime Minister backed Labour's calls for an immediate consultation on the future of civil partnerships once gay marriages are legalised. This could either lead to them being extended to heterosexual couples or scrapped totally. Concerns: Prime Minister David Cameron had faced warnings that the Tory party was at risk of tearing itself apart over gay marriage and Europe Despite the opposition of half the Tory backbenchers, the 11th-hour deal, a humiliation for the PM, means same-sex marriages could take place next summer. Mr Cameron's reliance on Labour to force the measure through highlighted his divisions with his backbenchers. Gay marriage has become the latest in a series of issues sparking friction between the PM and traditionalist Tories. The legislation had looked to be in serious trouble yesterday as Labour threatened to vote to introduce civil partnerships for straight couples as well - a move which critics said could cost the Exchequer £4billion by extending pension rights and inheritance tax breaks. Tory rebels were backing the move in an attempt to wreck the entire Bill. But the Government, which had previously suggested it would review civil partnerships within five years, headed off a potential defeat by agreeing to a consultation immediately. Sources said the review would be "very thorough and very, very long." In the Commons, Tory splits were highlighted by a clash between Sir Gerald Howarth and Margot James, the Tories" only openly gay woman MP. Miss James, welcoming the legislation, said many gay people had suffered abuse and anti-discrimination legislation was needed to protect them. But Sir Gerald replied: "I fear that the playing field has not been levelled. I believe that the pendulum is now swinging so far the other way and there are plenty in the aggressive homosexual community who see this as but a stepping stone to something even further. Pleased: Margot James, the Tories' only openly gay woman MP, said many gay people had suffered abuse and anti-discrimination legislation was needed to protect them Veteran Tory Edward Leigh protested: "If you dare disagree with the orthodoxy that gay marriage is the best thing since sliced bread, you are breaking a new taboo." He suggested that the "outlandish views of the loony left of the 1980s have now become embedded in high places." What the Government is refusing to recognise is that they are not legislating this Bill to redefine marriage in a vacuum. If you dare disagree with the orthodoxy that gay marriage is the best thing since sliced bread, you are breaking a new taboo Edward Leigh, veteran Tory They are legislating in a culture which has been so coloured by political correctness that mild-mannered people expressing reasonable beliefs in moderate tones are treated like villains," he added. Yvette Cooper, shadow home secretary, revealed that Labour would withdraw its support from the amendment tabled by Tory opponents of gay marriage. She said: "We know David Cameron's leadership is too weak to be able to push this through and to be able to get support on his own benches. We think that is a serious problem. But also we don't want to see gay couples who are desperate to set the date and get married at the mercy of this Tory infighting. Last night Cabinet ministers Iain Duncan Smith and Owen Paterson voted with the rebels who were calling for registrars to opt-out of performing same sex marriages. Mrs and Mrs: Cards supporting same-sex marriage on sale yesterday in a shop in Soho, central London. Gay marriage has become the latest in a series of issues sparking friction between the PM and traditionalist Tories The change was rejected by a majority of 190 but attracted the support of 150. Tory MP David Burrowes warned the legislation would become a charter for unfair dismissal of opponents and said it would unleash a "chill wind" for those who back "traditional marriage." 'We know David Cameron's leadership is too weak to be able to push this through and to be able to get support on his own benches' Yvette Cooper, shadow home secretary In a second vote, 148 MPs supported an amendment to protect the religious beliefs of a person who believes that marriage is defined as being between a man and a woman. 349 MPs voted against, meaning it was defeated by 201 votes. In a third vote, 163 MPs supported an amendment to protect those who opposed gay marriage from discrimination. But 321 MPs voted against, meaning it was defeated by 158 votes. A group of more than 30 current and former local party chairmen has written to the Prime Minister to warn him the legislation will drive Tory voters to UKIP. Bob Woollard, chairman of the Conservative Grassroots group, said: "Same-sex marriage is really a tipping point - a bellwether issue if you like. People have just said, "I've had enough, I'm off, I will never vote Conservative again."" A YouGov poll says 54 per cent support same-sex marriage, but revealed a deep generational split. Under 40s back the idea by three to one, but over 60s are two to one against.