All prime ministers leave office reviled. That is because, like inveterate gamblers, they can't step away from the table until every last penny of their political capital is spent. So David Cameron will eventually be so disliked as to be unelectable; the only questions for his opponents are when and why.

The phone-hacking scandal offers some clues. Cameron has been wounded by the affair but not grievously. The main villains of the saga are the journalists who violated the privacy of traumatised families and the media bosses who allegedly covered up systemic criminality in their newsrooms. The Prime Minister has a tan­gential connection to those allegations through Andy Coulson, his director of communications from May 2007 to January 2011, and editor of the News of the World when hacking was out of control. On 8 July, Coulson was arrested on corruption charges. That leaves a whiff of complacency and bad judgement around Cameron - but no politician ever died of a whiff.

Nonetheless, the Prime Minister's political antennae have malfunctioned. Partly the problem was that he flew into the crisis late, arriving from Afghanistan when the grim hacking revelations had already dominated a full 24-hour news cycle. Cameron then seemed to suffer from jet-lagged judgement. He failed to summon moral outrage to chime with the public's sense of affronted decency. He meandered towards the announcement of a judge-led inquiry. He recoiled from explicit demands that Rebekah Brooks, News International's chief executive, resign. He set the government against News Corporation's bid for 100 per cent ownership of BSkyB only when it became clear that the Lib Dems would support an opposition motion in parliament against the deal. Throughout, he seemed to be taking his cues from Labour.

Tory-come-lately

The riposte from Cameron's aides is that blunt moralism is a luxury enjoyed by opposition politicians, while governments must take more nuanced positions. The Prime Minister's friends point out that he had to be mindful of the legal complexities surrounding the BSkyB bid. "There is this awkward thing called due process," says one loyal MP. In the eyes of the public, however, Cameron ended up in the same place as Ed Miliband, only a week late.

Why the delay? Sheer disbelief at the scale of the allegations is one reason. Downing Street was "visibly shell-shocked", according to a witness inside the operation. Even George Osborne was stunned. Senior Lib Dems have been surprised by his hesitation. "George's usual ruthlessness hasn't been on show," one says. Another problem was the calculated reluctance to denounce News International prematurely, when loyalty had proved the safest course of action in the past. As an aide bluntly puts it, "You're in government, you're a Conservative and everything you know about politics is saying don't mess with the Murdoch press."

Cameron was also held back by a long-held prejudice about how seriously phone-hacking ought to be taken. Until the latest round of revelations, he was persuaded that the whole thing was a tedious obsession of Labour MPs and the Guardian newspaper. When asked about it in private, he was dismissive. It was never the subject of angry letters to Downing Street, he would say. It was not an issue raised in focus groups; therefore, it was not an issue. That was when the alleged targets were mostly celebrities. Once murder victims and soldiers' bereaved families were involved, Cameron recognised the new public mood of revulsion. Yet he did not have a ready store of pent-up anger to unleash in a way that could sound authentic.

Meanwhile, he stayed stubbornly loyal to Coulson. On the day of his former aide's arrest, he told a press conference that cutting a trusted ex-colleague loose would make him "a pretty unpleasant" person. The Tory MPs whom I have spoken to seem torn over the question of what this reveals about Cameron's character. They admire it as an act of chivalry, while recognising that, to the public, it risks coming across as the sound of a man in a hole still digging. MPs from all sides have been struck by the contrast with the expenses scandal. Then, too, there was a surge of public anger and a competition among party leaders to snatch the moral high ground. Cameron won that race by sounding resolute at the key moment. This time, Miliband has pulled off a similar trick.

Public scorn

There is another, more instructive comparison with Cameron's and Osborne's handling of the 2008 financial crisis. When Lehman Brothers collapsed and global finance looked precarious, the Conservative leadership was similarly stunned. Everything their party background had taught them about efficient markets and deregulated capitalism - the intellectual legacy of Thatcherism - suddenly looked uncertain. They were rattled and it showed.

Formulating a response to the expenses scandal was easy. MPs were caught with their fingers in the till, so slam it shut. The unravelling of Rupert Murdoch's credibility and the exposure to public scorn of his relationship with top politicians is as conceptually challenging for Cameron and Osborne as the revelation of market failure in the banking crisis.

A senior government adviser compares it, somewhat grandiosely, to the moment in the Renaissance when people realised that the earth revolved around the sun. "In terms of recent history, imagining a world without Murdoch is the equivalent of a Copernican revolution." That casts Cameron as a bewildered sailor, struggling for a moment to navigate the high political seas without News International on board.

He will recover his poise and grab back some political initiative, just as he did after the financial crisis, but the moment of numb hesitation was revealing. There is an intellectual rigidity about this Prime Minister. He governs fluently and affably when everything is proceeding as he thinks it ought to, following the ancient laws of establishment politics. He is quickly disorientated when those laws are challenged. Such brittleness will eventually be his undoing. There are only so many times a leader can be completely wrong about the defining issues of the times before people decide that he is not a real leader at all.