The last time a British government was alone in trying to veto a candidate for the presidency of the European commission was in 1994 under the Conservative prime minister, John Major. There are several similarities with the Juncker affaire - and one big difference.
Major, like Cameron, was tormented by his ferociously eurosceptic backbenchers. Their euro-bogeyman was the socialist president of the commission, Jacques Delors, who had fought many a battle with Margaret Thatcher and was an out-and-out federalist. When Delors' term was drawing to a close, a European council was convened in Corfu to choose his successor. The eurosceptics' rage knew no bounds when, thanks to a stitch-up between Germany and France, the Belgian prime minister, Jean-Luc Dehaene, emerged beforehand as the favourite to succeed Delors.
The right-wing press, led by the all-powerful Sun, jumped into the fray with lip-smacking relish. With the immortal front-page headline "Up Yours, Delors", the Sun had already left its boot-mark on the European debate. It then set about filleting à la Juncker the hapless, but rather amiable, Dehaene. As he left for Corfu, the pressure on Major to veto the Belgian's candidacy was immense. But no-one in Downing Street knew which way he would jump (I was his press secretary).
In the end Major vetoed Dehaene. As with Cameron, the British delegation had hopes of rallying support for an alternative candidate. Our favourite was the Dutch prime minister, Ruud Lubbers. Before the summit we had received vague noises of support for Lubbers from other member-states. But once it became known that Chancellor Helmut Kohl of Germany objected to Lubbers, that was the end of that. Our supposed allies melted away and the UK was isolated. Sound familiar?
But here's the big difference between the Juncker and Dehaene episodes. In 1994 the president of the european commission was chosen by consensus among heads of state and government. John Major was able, all on his own, to block Dehaene. Twenty years of ever-closer union later, Cameron did not have that power. The decision in the European council is today taken by weighted voting and the European Parliament gets a say as well. No single member-state can veto any more.
You might think that David Cameron would have fervently wished for his predecessor's veto. Well, if he did think that, he would have been wrong. Major's moment of glory in the eyes of his eurosceptic MPs and the Sun was fleeting. The congratulations of the Whips' Office were replaced within 24 hours by the ghastly question: if not Dehaene, who? With mounting horror, the penny dropped in John Major's Downing Street that the only viable candidate was... the Luxembourg prime minister, Jacques Santer.
It was impossible to demonstrate to parliament, press or public (if anybody cared) that Santer would be an improvement on Dehaene. In fact he was probably worse, as, having been duly appointed president, his commission collapsed in scandal and ignominy a few years later.
David Cameron has the political luxury of not having to answer the toxic question: if not Juncker, who? Unlike Major, he can luxuriate indefinitely in the plaudits of eurosceptic MPs and newspapers, with Ukip confounded and Labour wrong-footed. There has even been talk of a "Juncker bounce" in the polls for the Tories. In a brilliant manoeuvre, David Cameron has, some argue, turned humiliation in Brussels into a fair imitation of Rorke's Drift in valiant defence of a point of principle.
You could be tempted to go a step further and think that the whole episode has been part of a cunning plan to court isolation, so that the Europeans, fearful of Britain's leaving the EU, will give us inducements to stay. The only problem is that all the evidence points in the other direction: the assiduous wooing of Angela Merkel, the optimistic noises emerging for months from government briefings and the real anger on display from leaked accounts of what Cameron said at the european council and to its president, Herman Van Rompuy, on his visit last week to London.
It is hard to understand how the prime minister could have thought until so late in the day that he would have the support of a group of like-minded countries including Germany in blocking Juncker. Our embassies would have - should have - been reporting to London on exactly where each government stood on Juncker.
It may be that Cameron's defeat will paradoxically make it easier for him to get his way in future in the EU. The first test will come soon enough. The new commission portfolios have to be distributed later this year among member-states. It's classic horse-trading. If there is an inclination to compensate the UK, we will get a top job. If not, we won't. Then it will be a matter of Juncker's revenge, not his bounce.
Follow Sir Christopher Meyer on Twitter: www.twitter.com/SirSocks