DAVID Cameron, the Prime Minister, was left humiliated last night by a massive backbench rebellion, after around 80 Tory MPs defied the government and voted in favour of a referendum on Britain’s membership of the European Union.

Although the government defeated the motion by 483 votes to 111, almost half of Tory backbench MPs who are not on the payroll defied the three-line whip and voted for a referendum. Including abstentions, the number of Tory MPs who refused to back Cameron was almost 100, according to some estimates.

The number of rebels was nearly double the 41 MPs who defied John Major by voting against the third reading of the Maastricht Treaty in 1993, making it the largest Tory backbench rebellion on record by some distance. It was also the biggest backbench rebellion since the coalition came to power in May 2010.

MPs were voting on a motion that would have put pressure on the government to give the electorate a referendum on whether Britain should stay in the EU; leave it entirely; or renegotiate the terms of its membership.

The parliamentary vote was prompted by an online petition, signed by 100,000 people, demanding a national vote on the UK’s place in the European Union.

Because the result was non-binding, the government would not have had to hold a referendum even if MPs had voted for one. But Cameron turned it into a vote on his leadership by imposing a three-line whip.

Speaking shortly after the vote, David Nuttall, the Tory MP who tabled the motion, said that while the government had won the vote “they have certainly not won the war”.

Douglas Carswell, the Tory MP for Harwich, said: “Finally people in the Westminster bubble are beginning to reflect the real concern that people have out there about our future in Europe.”

Earlier in the day, Cameron and George Osborne, the chancellor, tried in vain to quell the size of the rebellion by meeting and ringing around wavering MPs. However, as the day progressed, it became clear that the Prime Minister’s decision to impose a three-line whip had backfired by stoking disquiet on the back benches.

Adam Holloway, the parliamentary private secretary to Europe minister David Lidington, effectively resigned by joining the rebellion. He was the most high profile in a clutch of aides who sacrificed their jobs to defy the government.

Last night, a Downing Street spokesman said: “The House of Commons has clearly voted against this motion.

“We understand that many people who voted for it felt very strongly -- and we respect that. However, the government has to do what is in the national interest. The easy thing to do would have been for us to have avoided expressing a view. It was important to take a strong lead – because Britain’s best interests are served by being in the EU.

“The PM has made clear that he shares the yearning for fundamental reform of the EU and is determined to achieve that.”

Cameron told critics that the worsening crisis in the Eurozone was not a valid reason for the UK to sever ties with Europe. “When your neighbours’ house is on fire, your first impulse should be to help them to put out the flames, not least to stop the flames reaching your own house,” he told parliament.