Angela Merkel and David Cameron are looking at an uncertain future over the UK's membership in the EU.

Editor’s Note: Robin Oakley was political editor and columnist for The Times newspaper in London from 1986 to 1992, the BBC’s political editor from 1992 to 2000, and CNN’s European Political Editor between 2000 and 2008. The opinions expressed in this commentary are solely his.

Story highlights

David Cameron has pledged to renegotiate Britain's terms of membership in the EU

A confrontation with German Chancellor Angela Merkel looms over the UK's demands

Oakley: Cameron's miscalculations could see him lead the UK out of the EU by mistake

Oakley: Cameron, a centrist Conservative, has backed himself into a corner with EU referendum

CNN  — 

David Cameron is in danger of becoming the Prime Minister who takes Britain out of the European Union by mistake.

Cameron’s looming confrontation with German Chancellor Angela Merkel over the European Union’s principle of free movement of peoples could set off a chain reaction which sees Britain choose to exit the EU in a referendum Cameron has promised voters in 2017.

Just a few weeks ago it appeared that miscalculations by Cameron might have seen the breakup of the United Kingdom. In the referendum granted to Scotland on its continued membership in the UK, he was widely criticized for agreeing to the wrong question at the wrong time, with no qualifying majority built in and with no participation rights for Scots living elsewhere in the UK. That the Scots in the end voted to stay was widely reckoned to owe far more to the intervention of former Labour Prime Minister Gordon Brown than to anything Cameron did.

Now Cameron is under fire again for failing to do his homework, for entering battles he cannot win and for employing dangerous short-term tactics in the hope of averting further blows from the advancing United Kingdom Independence Party at a forthcoming Parliamentary by-election and in next summer’s General Election.

Cameron is a pragmatic Tory centrist who warned his Conservative party in 2006 that it had been losing elections because instead of talking about issues like the National Health Service and education, “we kept banging on about Europe.” He was then – and probably still is – an advocate of continued British membership of the EU.

But in order to win the support of the Euro-skeptic right wing of his party in the election that brought him the Tory leadership, Cameron made a promise to take the Conservatives out of the European People’s Party – the main center-right grouping in the European Parliament.

That cynical exercise in “gesture politics” alienated Angela Merkel and other potential key allies in Europe. It also taught the Euro-skeptics that Cameron could be pushed around.

The clever exploitation of Britain’s “anti-politics” mood by UKIP in recent months has seen Cameron forced onto the back foot. Now he himself is constantly in the headlines, “banging on,” as he used to put it, about Europe.

The trouble is that he has chosen the wrong issues and made undeliverable promises which only strengthen UKIP’s claims that mainstream parties are not to be trusted.

He has pledged to renegotiate Britain’s terms of EU membership before the promised referendum, but has failed to coax any European allies into an agreement on the specific reform issues that he has in mind.

He vehemently opposed the candidacy of former Luxembourg Prime Minister Jean-Claude Juncker as the new President of the European Commission, but found only Hungary willing to support him in what ended up being a 26-2 endorsement for Juncker.

Angered by the new financial demand from the EU in its ten yearly accounting system for a further 2.1 billion euros ($2.7 bn), Cameron has huffed that he simply won’t pay. He certainly deserves some sympathy on that issue: the timing could not have been worse for him politically. But there is no evidence that the EU’s claim under the existing rules is illegitimate and Britain has always prided itself previously on obeying the rules of the club when others sought to bend them.

The issue that UKIP has most successfully exploited is that of immigration, and now Cameron is running scared, making a lot of noise on a subject whose constant presence in the headlines can only benefit his opponents.

Again luck has deserted him. The coalition government has made progress in curbing immigration into the UK from countries outside the EU. But Britain’s swifter recovery than other European nations from the economic crisis has made it a magnet to EU citizens who see a better chance of work there than in their own countries. The Conservatives have not therefore been able to meet their pledge to reduce immigration to under 100,000 people a year.

With few positive policies to offer, UKIP has made the immigration issue its own. So now Cameron is insisting that he wants an end to the basic EU rule on the free movement of its citizens between member nations. But again he is without obvious allies and raising expectations he cannot fulfill.

Angela Merkel and some other leaders may be willing to help David Cameron curb exploitation of the benefits system by “benefit tourists” and the like. But there is no way, as Merkel is making clear, that she will agree to the ending of the basic EU principle of the free movement of its peoples between nations.

If Cameron does somehow manage success of a sort at the next election and return at the head of another coalition government, he will do so as a leader pledged to alter Britain’s terms of EU membership and pledged to an in-out referendum on Britain’s membership. He will have made further fearsome noises on restricting immigration which his speech writers are even now desperately trying to cobble together.

The problem: No one else in Europe is showing the slightest interest in altering those terms of membership, especially on altering the free movement of people.

Cameron will try, and almost certainly he will fail – with a serious prospect that a disillusioned British people, stoked up by his rhetoric as well as UKIP’s, will then insist that they want out. And the only question remaining will be: which side will the previously pro-European Cameron then be supporting – the Ins or the Outs?

The opinions expressed in this commentary are solely those of the author.