Of all the many factors that determine political success and failure, there can be no doubt that luck features pretty high on the list.
David Cameron has always been a lucky politician. He had the good luck to be elected to the Tory leadership at just the point when people were starting to tire of New Labour, and the good luck to be battling for power against Gordon Brown rather than Tony Blair.
This week his luck held out again, just at the point when it looked as though it might be finally running out.
Amid continuing fallout from Liam Fox's resignation and a looming Tory backbench rebellion over Europe - remember those? - news came through of the death of Colonel Gadaffi - another enemy in whom Mr Cameron has been fortunate.
When Britain first entered the Libyan conflict on the side of the anti-Gadaffi rebels earlier this year, I have to confess that my first reaction was: "Oh, no, here we go again."
At best, I feared another misguided crusade to foist Western-style political values on an Islamic country with no tradition of democracy, and at worst, a lengthy civil war costing hundreds of British lives.
As it turned out, though, my fears proved groundless. Mr Cameron promised that Britain's role would be limited to aerial bombing rather than boots on the ground - and he was as good as his word.
He also repeatedly stressed the importance of Britain's national interest in the removal of Gadaffi, rather than making the case for Britain's involvement on moral interventionist grounds as Mr Blair might have done.
The involvement of the former Libyan regime in the shooting of WPC Yvonne Fletcher in 1984 and the Lockerbie bombing in 1988 was of course well-documented, even if only one person has ever been convicted of either crime.
What was less well-known until the start of this conflict, was Gadaffi's involvement in arming the IRA and thereby prolonging the bitter conflict that blighted these shores from the late 1960s to the mid-1990s.
In this respect, Mr Cameron was merely following in a much older tradition of British foreign policy - the one first established by Lord Palmerston in the middle of the 19th century.
"We have no eternal allies, and we have no perpetual enemies. Our interests are eternal and perpetual, and those interests it is our duty to follow." he said in 1848.
The danger for Mr Cameron, as the BBC's Nick Robinson has pointed out, is that having succeeded in Libya he develops something of a taste for military conflict.
In this context it is worth remembering that Mr Blair's first war was the successful intervention in Kosovo, not the later much more problematic entanglements in Afghanistan and Iraq.
Some credit, too, should go to Dr Fox who, whatever his other shortcomings, left the Ministry of Defence with a reputation more formidable by far than any of his short-lived Labour predecessors.
Having faced down Chancellor George Osborne over the spending review last autumn, securing proper ongoing funding for our armed forces may well prove his most important legacy.
Victory over Gadaffi does not, by any stretch of the imagination, remove Mr Cameron's wider problems within his own party.
His enemies on the right are not in the least pleased by the substitution in the Cabinet of the right-wing traditionalist Dr Fox for the socially-liberal Justine Greening, who came in as transport secretary in last Friday’s enforced reshuffle.
They are said to be even more incensed by the elevation of a Cameron 'favourite,' Chloe Smith, to a middle-ranking Treasury job, ahead of what they see as more talented, but also more right-wing, rivals.
And above all, they are up in arms over the imposition of a three-line whip against plans to hold a referendum on EU membership in 2013, due to be debated in the Commons next week.
With mounting concern over the implications of the Eurozone bailout, this last issue has the potential to be as toxic for Mr Cameron as it was in the 1990s for his predecessor-but-three, John Major.
Unless the three-line whip is modified, there may well be resignations in the government’s junior ranks.
But in his calm and authoritative handling of the Libyan conflict, Mr Cameron has once again demonstrated why he is vastly more popular than his party.
And so long as that remains the case, they won’t dare push him too far.