Prime Minister David Cameron suffered an embarrassing defeat in parliament on Monday after Eurosceptic members of his Conservatives joined forces with Labour MPs to reject proposed rules for a European Union membership referendum.

It was Cameron’s first parliamentary defeat since he was re-elected in May with a slim majority and highlighted the historic splits over Europe in his Conservative Party that contributed to the downfall of two of his predecessors.

Cameron, who plans to reshape Britain’s relationship with the bloc ahead of a membership vote by the end of 2017, has said he wants to stay in a reformed EU but rules nothing out if his renegotiation is unsuccessful.

While overall legislation paving the way for the referendum easily passed to parliament’s upper house following a vote in the House of Commons in the early hours of Tuesday, the government will now have to accept changes after MPs voted 312-285 on Monday against some of the bill’s proposed rules.

Cameron made two concessions last week over the referendum, agreeing to make the wording of the question more neutral and to accept some limits to government activity in the run-up to the vote.

While MPs from Cameron’s party back the idea of holding the referendum, many Eurosceptic Conservatives argued the concessions did not go far enough and said a full period of “purdah”, barring the government from publishing anything that could influence the outcome, must be applied.

“If the public detect that the referendum has been rigged to help one side, the public will not feel it’s legitimate, they will not feel that the debates are straight and whatever the result is, many of them will not accept it,” Conservative lawmaker and former minister Owen Paterson told parliament.

Britain’s election watchdog has also expressed concerns about not implementing purdah in full, a change the government has argued was needed to prevent a situation whereby British officials were unable to react to international events concerning Europe for fear of breaching regulations.

‘RUSHED THROUGH’

The Labour Party, which voted against the government’s proposed rules, described the defeat as “humiliating” for Cameron.

“The government should never have rushed through its flawed plans to play fast and loose with the rules on the referendum,” Labour foreign affairs spokesman Hilary Benn said in a statement following the vote.

The defeat at the hands of 37 rebels within his own party will ring alarm bells for Cameron, signalling that deep historical divisions within the Conservatives over Europe still exist.

In the early 1990s, a prolonged and bitter rebellion over Britain’s implementation of the EU Maastricht treaty weakened former Conservative Prime Minister John Major’s government – which also had only a slim majority – and contributed to his eventual election defeat.

In a boost to Eurosceptics, an opinion poll published on Saturday showed a majority of Britons now favoured leaving the European Union amid concerns over immigration, the first time that series of polls had found a lead for the “out” campaign since November 2014.

Pollsters Survation also said a “significant minority” of voters who favour remaining in the EU would consider changing their minds should Europe’s migration crisis worsen.

The migration crisis and initial reluctance by Britain, which is not part of the EU’s Schengen zone of open border travel, to accept more Syrian refugees, has threatened to overshadow Cameron’s ongoing renegotiation efforts.

“It’s true the UK isn’t in the Schengen zone and so it has some possibilities that the rest of Europe doesn’t have. But that doesn’t exempt it from making an effort in solidarity,” French President Francois Hollande told a news conference on Monday.

“Everyone must understand: You can’t ask for solidarity when there’s a problem and then exempt yourself from doing your duty when there is a solution,” Hollande said.