When David Cameron urges European Union leaders today to do a deal to keep Britain in the bloc, he will face a riddle that has haunted Conservative prime ministers for three decades: a row with Europe or a row with Eurosceptics at home?

Cameron’s bid to renegotiate the terms of Britain’s membership of the bloc, ahead of a referendum he has promised by the end of 2017, has hit the rocks over a demand to make working EU migrants wait four years before getting some benefits.

EU partners call that measure impossible while Conservative opponents of membership have pounced on hints that he may drop it as evidence that the renegotiation is a choreographed sham that will end in a fudged deal early next year.

“If the prime minister is not able to persuade the EU nation states to give us the four-year wait on migrant benefits, then it really will be trivial,” Steve Baker, a Conservative lawmaker who is campaigning for a British exit, said.

“My expectation is that by the time we get to February something will be offered which will be presented as a great success, but that it will still be inconsequential.”

Baker said he has 136 Conservative lawmakers on his mailing list, indicating that more than a third of Cameron’s 331-strong parliamentary party may be toying with the idea of a ‘Brexit’.

Senior Conservative Eurosceptics are waiting to see the final results of Cameron’s high wire act before making their views explicit, though Defence Secretary Michael Fallon quipped in October that “We’re all Eurosceptics now”.

Pro-Europeans fear Cameron could edge Britain towards an accidental Brexit if he overplays his hand in talks to appease sceptics in his party and senior Conservatives who are jockeying for a battle to succeed him due before 2020.

I just don’t think it’s realistic for Britain to carry on with a small fix when the EU is obviously transforming itself in a very dramatic way towards political union

A British exit would rock the Union – already shaken by differences over migration and the future of the eurozone – by ripping away its second-largest economy, one of its top two military powers and by far its richest city, London.

An exit from the EU could also trigger the break-up of the UK by prompting another Scottish independence vote. The $2.9 trillion British economy would face years of uncertain negotiations over the terms of a divorce.

The timing of the referendum is uncertain but Cameron has said he would prefer it as soon as possible. If he gets a deal in February, as European Council president Donald Tusk has said is possible, the vote could be as early as June.

Opponents of EU membership say that if it took back full sovereignty, Britain could prosper as a global trading centre outside a bloc they say has slipped far behind rivals.

Opinion polls show British voters are evenly split over membership, with a significant number of people who have yet to make up their mind, though perceptions that the EU has failed to deal with the migrant crisis may be turning some towards a Brexit.

So far his renegotiation has failed to impress Conservative Eurosceptics who believe the leaders of the eurozone must forge a much deeper political union to save the euro.

“I just don’t think it’s realistic for Britain to carry on with a small fix when the EU is so obviously transforming itself in a very dramatic way towards political union,” John Redwood, a Eurosceptic Conservative lawmaker, said of the renegotiation.

Cameron says he will recommend Britain stays in the EU if he gets what he wants but has repeatedly warned that he rules nothing out if he doesn’t – code for campaigning to leave, a step that would make Brexit highly likely.

One cartoon in The Times newspaper showed Cameron trying to smash down an EU door with demands before eventually relenting in exhaustion and then knocking politely with a tray of wine. The door opened.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.