Britain’s EU membership is no longer safe in David Cameron’s hands. His first advice to his party was to, “stop banging on about Europe”. Yet his weakness in the face of internal Conservative pressures, fuelled by Ukip’s insurgency, ensures the dominating issue of any Cameron second term will be Europe. Lumbered with a renegotiation/referendum pledge he never wanted to make, he risks a Brexit that in 2013 he proclaimed with “heart and soul” to fight.

While never an instinctive pro-European, Cameron must understand what exit would mean for Britain’s attractiveness to global investors and residual influence in the world. To allow Brexit to be his legacy would set him apart from the judgement of the British national interest made by every single prime minister since Harold Macmillan, including Margaret Thatcher.

Yet his “renegotiation” strategy makes the massive concession that our EU membership on present terms is unacceptable. Renegotiation might have had some real validity if the “remorseless logic” of the Eurocrisis had led to a federal inner core with which Britain outside the Euro would have to forge a new relationship. But no such federal treaty is on the horizon within Cameron’s unilateral timescale.

Two years ago in his Bloomberg speech, Cameron morphed his renegotiation into a set of wide-ranging EU reforms that struck a chord with our EU partners. Yet it is one thing to call for “reform” of the EU: quite another to imply that without “reform”, Britain might be better off outside. Cameron initially ducked this dilemma by couching his renegotiation agenda in more positive pro European terms than any Conservative leader since John Major, arguing. “I believe something very deeply. That Britain’s national interest is best served in a flexible, adaptable and open European Union . . . Over the coming weeks, months and years, I will not rest until this debate is won.”

Yet these glowing sentiments have now been removed from the Downing Street website. Cameron’s reform agenda has meanwhile been adopted by the incoming European Commission. Yet British recognition of this has been lost in Cameron’s crowd-pleasing opposition to Juncker’s appointment as the new Commission President. Under pressure from Ukip, his 2014 conference speech put migration, “at the very heart of my renegotiation strategy”. Looking straight into the TV cameras, he solemnly pledged: “Britain, I know you want this sorted. I will go to Brussels, I will not take no for an answer.” Cameron later avoided a car crash by ditching quotas from his immigration demands, but on benefits, his plans to discriminate against migrant workers are full of potential Brussels elephant traps.

Pro-Europeans are far too complacent about the referendum prospect. While a renegotiation package can be cobbled together, the gap between eurosceptic expectations and negotiating realities will be hard to square. We are not in 1975, led by a statesmen of Harold Wilson’s calibre. Nor are we living in a society where the judgement of our political leaders carries automatic public respect. Unlike 1975, pro-Europeans will face an unremittingly hostile press.

And the high politics is very difficult. By 2017, the manoeuvring for the Cameron succession will well and truly have been joined. Leading contenders will be tempted to "cut and run". Conservatives of the Cameron ilk believe above all else that it is in the national interest that the Conservative party remains united and in power. Anti-Europeanism is an irreconcilable threat to this unity. A motley alliance of dogmatic free marketeers, Atlanticist neo-cons, Westminster sovereigntists and radical libertarians has been made electorally sustainable as a separate force by the Ukip-led surge of anti-immigration populism.

Cameron can only win a referendum by confronting these pressures. His Bloomberg speech made a case for "a more flexible, a more adaptable, a more open” Europe. It is precisely the case for openness that those tempted by Ukip fundamentally reject. The tensions within the Conservative camp between the pro-business wealth-creators and the anti-migrant populists are becoming unbearable. Will Cameron and Osborne be prepared to pay the necessary political price in Conservative unity for keeping Britain in the EU? This is the biggest doubt that hangs over Britain’s EU membership.

But if Ed Miliband ends up as Prime Minister this year, can pro-Europeans relax? Is the risk of Brexit dead and gone? Miliband has bravely opposed an in/out referendum on principle. He now needs to set out a positive Labour agenda for EU reform. This should not be a pale imitation of Cameron’s, but a programme of social democratic reform that for example backs the Juncker 300bn euro investment boost to growth, a social Europe that mandates minimum wages and tougher rules against labour exploitation, a budget reform that prioritises research and innovation, and a migration policy that strengthens the EU’s common borders.

The risk is that Labour’s position on immigration – which is now intimately intertwined with the debate about Europe and the free movement of labour – is opaque, defensive and potentially worrying. The party is right that in order to maintain confidence in our social security system, the issue of “benefit tourism” should be addressed. Nonetheless with employment rates among migrants of working age higher than among the native population, the party should beware of joining the downward spiral of anti -migrant scapegoating driven by Ukip and all-too-often joined by the Conservatives. Politicians of all parties are reluctant to acknowledge that migrants have made, and continue to make, a huge positive contribution to the British economy and public finances. Britain needs a new language of honesty about migration: a failure to do so will skew the public debate and simply store up trouble if Miliband makes it to Downing Street.

Moreover, a minority Labour government, facing harsh economic decisions, could well be weak: there could even be a majority for a referendum in a House of Commons, even with Labour as the largest party, and a second general election in short order may be on the horizon. The Conservatives with Cameron gone would in all likelihood shift further against Europe. Meantime, in May, Ukip may emerge as the main threat to Labour in the party’s traditional heartlands, triggering renewed internal pressures within Labour to harden its stance on both Europe and immigration.

Labour faces an existential choice between, on the one hand, a vain attempt to turn the clock back to a closed world of idealised old Labourism within a crumbling British state, or on the other, a principled embrace of the realities of global interdependence, Europe and an open society. This is the ground on which the radical left and centre should fight. One way or another, a Labour government will not bury the European question for the foreseeable future, and nor should it try. Unless a stronger pro-European argument is loudly made, and a Labour government is prepared to promote it, Britain’s sleepwalk to Brexit may well resume.

Roger Liddle is chair of Policy Network. The Risk of Brexit: Britain and Europe in 2015 is published by Rowman & Littlefield in January 2015