Gordon Brown has been experiencing mixed emotions this week.

One side of him has felt what can best be described as a sense of Schadenfreude as he watches the pressure pile up on Rebekah Brooks and James Murdoch.

Brown has never, and will never, forgive the pair for the brutal manner in which they withdrew the Sun's support for Labour before the last general election. The former prime minister always knew he would struggle to retain the red top's support. But pulling the plug on Labour in the autumn of 2009 on the evening of his last speech to the Labour conference before the general election was seen as a deeply hostile act.

But Brown is not enjoying any sweet taste of victory because his over-riding emotion is one of regret. He believes that had the latest set of allegations been aired 18 months ago he might well still be prime minister.

It might seem slightly far-fetched to believe that alleged law breaking at Britain's largest Sunday tabloid newspaper, even if it supports the Tories, could have changed the result of the election. But here is his logic.

Had two of this week's key developments become public at the turn of 2009/10 then the electorate's doubts about David Cameron might have hardened into outright rejection. Brown believes those doubts explain the Tories' failure to secure an overall majority.

The two disclosures – the hacking of Milly Dowler's phone and News International's admission that payments were made to police – raise questions for Andy Coulson, Cameron's communications chief from 2007 to January this year. Coulson was NOW's deputy editor at the time that Milly Dowler's phone was hacked and News International let it be known this week that it had passed emails to the police suggesting he was aware of the police payments.

Brown believes the appearance of these allegations 18 months ago would have led to Coulson's immediate resignation. That would have led to questions about Cameron's judgment in hiring Coulson. These questions are being asked now. But Brown believes that Cameron would have faced far more pressure in the immediate period before a general election. Voters, who were unsure about the Tories, would have turned away from Cameron, according to the Brown thinking.

The former prime minister developed a close interest in the phone hacking scandal after the Guardian disclosed in July 2009 that News International had paid more than £1m to settle cases that threatened to reveal widespread phone hacking. Patrick Wintour and I recently reported that a few months later, after the News of the World and the Sun abandoned their support for Labour, Brown sought to hold a judicial inquiry into the allegations. This was blocked by Sir Gus O'Donnell, the cabinet secretary, on the grounds that it would be too sensitive before the election.

At least Brown will be able to claim victory on that front as his protégé Ed Miliband meets Cameron next week to discuss the arrangements for the two inquiries that are likely to be held. Patrick Wintour wrote on Thursday night that the first inquiry into the police investigation will be led by a judge. The second inquiry into media regulation is unlikely to be led by a judge.

And who was the decisive voice in persuading Cameron that at least one of the inquiries must be led by a judge? That would be Nick Clegg who of course was the man directly responsible for Brown's resignation. During the coalition negotiations Clegg held open the possibility of a coalition with Labour but only if Brown announced that he would step aside.