Mr Cameron's failure can be traced back to his decision to take the Conservatives out of Europe's largest centre-right block.

He felt the European People's Party (EPP) wasn't Eurosceptic enough, so he left -- leaving behind much of the influence he ought to have had with the kind of European leaders he ought to get on with.

The Prime Minister's objections to Mr Juncker may be honestly held -- he is too pro-EU for most in the Conservative Party -- and they may be shared by other leaders around the top table in Brussels.

But waging such a public campaign, being so openly dismissive of a view endorsed by all-but two EU leaders, has isolated Mr Cameron.

He made optimistic noises after meeting other centre-right EU leaders, notably Angela Merkel, only to see her throw Germany's support behind Mr Juncker a few days later.

That was David Cameron's last chance to pursue a different tactic, not supporting Mr Juncker, but dropping his public opposition, perhaps in return for a top Commission job for Britain.

That would have made his main task -- winning wide-ranging reform of the EU -- a little bit easier.

Why now would Mr Juncker now do anything to make Mr Cameron's life easier?

David Cameron tries to present his defeat as a brave victory -- losing a battle to win a war. He hopes that will chime with the people who voted for UKIP last month, and help him win next year's election.

But what he claims as a show of strength will be portrayed by his enemies as humiliating failure. Ed Miliband, also opposed to Mr Juncker, won't let that stop him accusing Mr Cameron of weakness. UKIP's in no doubt who won today's fight...

David Cameron's response to Juncker's appointment shows that he is a loser who has learned nothing.

David Cameron wants to negotiate tough new terms for the EU, then take that to the British people in a referendum, confident he can urge a vote to stay in a reformed Europe.

Instead, he may end up forced to advocate withdrawal in 2017. Or, even worse for David Cameron, he may find himself on the opposition back benches, with all the time in the world to mull over what went wrong.