It's been a tough few days for the prime minister – and one in which he's deployed his best skill as a politician. This week, David Cameron exercised the trait which might just keep him in power after 2015.
There is something fitting about Cameron being the leader of a country whose sporting teams are struggling a little at present. The prime minister is becoming the man who can take positives from humiliating defeats.
In both the two big stories of the week – the Andy Coulson guilty verdict and today's vote over Jean-Claude Juncker – Cameron has found himself on the losing side. But, somehow, he is managing to not just get away with it but even to take positives from what should be unmitigated calamities. It's quite a skill to have up your sleeve.
What makes it all the more impressive is that the prime minister's judgement has been under scrutiny this week. That is obviously the case with regard to his decision to hire Coulson, who – as Ed Miliband repeatedly pointed out – turns out to have been a criminal. It's also the case in Brussels too. The decision to take on the rest of Europe over Juncker is ultimately the PM's responsibility. He didn't have to take on this particular struggle. Now he is, and is losing it comprehensively. Is he picking the wrong fights?
It was always going to be tough for the prime minister to get his way in Europe. From the moment No 10 declared war on Juncker, everything seemed to go wrong. Angela Merkel's sudden about-turn was decisive, of course. After that the British establishment seems to have belittled itself by coming up with more and more desperate ideas to try and block Juncker's appointment. The Luxembourg Compromise, a far-fetched resort to the rulebook, proved a non-starter. Today's Telegraph headline about Juncker's drinking just seemed petty.
So it was that by the time of the summit even Cameron was forced to admit the odds were against him. His hope was that he could turn defeat into victory. But a 'veto moment' only really works when you actually, you know, veto something. Pushing a one-sided issue to a vote is just grandstanding, and everyone knows it. Still, at least it gives the PM something to take away from it.
And this is what makes the PM the man who is good at losing gracefully. He is very good at taking positives from setbacks. So it was with Coulson; the defence he offered in the face of Ed Miliband's attacks in prime minister's questions left the press scorning the leader of the opposition as much as his rival. Rebekah Brooks' acquittal meant the extent of Cameron's relationship with her became irrelevant. The apology was nearly unprecedented, but this could have been a lot worse for Cameron.
What the Coulson case revealed is confirmation of one of the PM's most interesting traits: his loyalty to his inferiors. As we saw with the furore over ex-culture secretary Maria Miller's expenses, the Cameron proved reluctant to take the decisive step even though it meant taking personal political flak. So it was with Coulson. He is, it seems, a naturally trusting sort of man. He wanted to give Coulson a "second chance". Perhaps his coming reshuffle will see other dear departed ex-ministers from the coalition given another opportunity to return to power.
Making the best of difficult situations is a useful trick. Cameron has deployed it this week after the Coulson verdict with aplomb. And now he is shoring up his support among eurosceptic backbenchers by kicking up a stink in Brussels.
It's a skill that Cameron's used before. After five years of hard work in opposition, when his big moment came he failed to win an overall majority. His response? That "open offer" to the Liberal Democrats to form a coalition. Where Labour dithered and appeared frosty, Cameron welcomed Nick Clegg with open arms. He was making the best of a bad situation – and it's kept him in power ever since.
It was tough for the Tories in 2010 and it will be no different next year. So here's a thought to cheer up any disconsolate staff in Downing Street: maybe by practising his most useful political skill this week, he'll find himself ready to use it again in hung parliament talks next year.