David Cameron is heading for defeat in a battle against our European Union partners.

The Prime Minister has been on a one-man crusade to try to prevent Jean-Claude Juncker, the former Prime Minister of Luxembourg, becoming President of the European Commission.

You may well ask what this has to do with you. Well, for a start, you voted for Mr Juncker – or so he says.

Those European Elections in May, when we in the UK were obsessing about UKIP, were seen in many other parts of Europe as elections for the post of European President.

If you voted for a Socialist candidate – that includes Labour candidates, as they sit in Brussels as members of the Party of European Socialists – then you were backing German MEP Martin Schulz.

If you voted Lib Dem then you were backing Guy Verhofstadt, former Prime Minister of Belgium.

If you voted Green then you were backing German MEP Ska Keller.

And if you voted for the European People’s Party – made up largely of Christian Democrats – then you were backing Mr Juncker.

Now, British voters were at a slight disadvantage, because there weren’t actually any European People’s Party candidates standing in the UK, so you couldn’t vote for this guy even if you wanted to.

The idea of Christian democratic politics, popular in much of Europe, has never taken off in the UK, where we have tended to be more secular and now more multicultural than some of our neighbours.

Christian Democrat parties are not hostile to other religions and may well include politicians from different faiths. However, the world “Christian” in their name isn’t just for show and the parties have an avowedly Christian ethos.

So British people could not vote for Mr Juncker. But I guess this made very little difference in practice, as I suspect very few British voters even knew elections for the President of the European Commission were taking place.

And to make things more complicated, there’s some debate about whether we did, in fact, elect a president or not.

Mr Juncker and supporters argue that he won, because the European People’s Party got 222 seats in the European elections, more than any other party.

But David Cameron is arguing that this makes no difference. He says that the European Council must decide who becomes president of the European Commission.

The Council involves the heads of EU member governments meeting together. So what Mr Cameron is saying is that the prime ministers and presidents of EU member states should make the big decisions, including deciding who gets the top jobs.

Both sides in this dispute argue that they are standing up for democracy.

On the one hand, you could say that it is democratic to respect the results of May’s European elections.

But on the other, you might argue that the EU should be run for the benefit of its member states – and the people that we elect to lead us, such as Mr Cameron, French President François Hollande, German Chancellor Angela Merkel and so forth, should have ultimate control over it.

It depends perhaps on whether you see the EU as an organisation that is, or should be, subordinate to the countries that are in it.

MEPs in the European Parliament, as a rule, think that the European Union should have a certain degree of authority in its own right – representing the people of Europe directly, rather than simply being a tool of its membes.

This is why even the European People’s Party’s rivals in the European Parliament, such as the Socialist group of MEPs, are arguing that Mr Juncker must now become European Commission President.

They see his appointment as a chance to assert the independence and power of the European Parliament.

The battle comes to a head at the European Council, which kicks off with a dinner on June 26 and gets underway properly on June 27.

At time of writing, it’s impossible for say for sure what will happen, But it seems almost certain that Mr Cameron will lose - because Mrs Merkel has said that she backs Mr Juncker to be the European Commission president.

It’s not clear that Mrs Merkel really wants him either. Back in October last year, she insisted there was no “automaticity” between the results of the EU election and becoming President of the European Commission.

And it was reported that she backed International Monetary Fund Director Christine Lagarde for the job.

But she came in for hefty criticism at home for her stance, from party colleagues – she is leader of the Christian Democratic Union party in Germany – and from media commentators who accused her of behaving, yes, undemocratically.

So Mr Cameron is set to fight a losing battle, valiantly taking on the rest of Europe.

But he doesn’t seem unhappy about it. In fact, he appears delighted – perhaps because he knows it will go down well with many Conservative Party colleagues, who are cheering him all the way.