Andrew Grice: Is News International's misery Gordon Brown's revenge?

Some say Mr Brown believes he could still be Prime Minister today if the most recent claims about hacking had emerged before the election

Gordon Brown's speech to Labour's last party conference before the general election had gone well. "Seven out of 10," was the reaction even among sceptical media observers. Labour folk gave it a nine and were in good heart.

A few hours later, the mood in Brighton turned ugly. Word spread that The Sun was going to attempt to eclipse the Brown speech by announcing it was deserting Labour after 12 years and switching its support to the Conservatives.

Some voices inside News International thought it would be better to wait until nearer the election. But The Sun decided to press the nuclear button for maximum impact. From the paper's point of view, it worked – at the time, at least. The media loves a story about the media, and the coverage of the paper's move clouded that of the then Prime Minister's speech.

Mr Brown was incandescent. He refused to reply to a flurry of phone calls and texts from Rebekah Brooks, NI's chief executive, with whom he had never really got on and whom he regarded as being closer to Tony Blair. Mr Brown was convinced a deal had been done under which David Cameron had won the backing of the Murdoch camp in return for an assurance that a Tory government would not restrict media ownership. NI insiders say the reason was more prosaic: Rupert Murdoch wanted to back the winner and thought Mr Brown was going to lose.

Mr Brown's aides would often remark that he was "obsessed" with the phone-hacking allegations. Yesterday they discovered why, when allegations emerged that while he was Chancellor, The Sunday Times obtained his financial and property details and The Sun medical records of his children. After he became Prime Minister, the Cabinet discussed ordering a public inquiry into phone hacking. But the Metropolitan Police were playing down the scale of the practice and, with the election approaching, ministers were cautious about declaring war not just on the Murdoch empire but many other newspapers too. They also feared it might look like a desperate last throw of the dice by Mr Brown as he faced defeat.

Mr Brown's suspicion that his phone was hacked was revealed by The Independent on Sunday in January, after he asked the police whether he had been a victim. One of his closest political allies is Tom Watson, the Labour MP and former minister who has been in the forefront of disclosing allegations of hacking, sometimes using the protection of parliamentary privilege.

Some say Mr Brown believes he could still be Prime Minister today if the most recent claims about hacking had emerged before the election. If Mr Cameron had been forced to sack Andy Coulson, it might have reinforced the doubts in voters' minds about the Tories, which were enough to prevent them winning an overall majority.

We shall never know. But it would have been a big story in the run-up to an election, calling into question Mr Cameron's judgement in hiring Mr Coulson.

The timing of yesterday's disclosures will doubtless be seen at NI's Wapping headquarters as an attempt by Mr Brown to exact revenge by kicking a man while he is down. With Ed Miliband making the political weather, it was safe for the former Prime Minister to decide it was payback time.

Mr Brown's friends believe he is merely giving the Murdoch empire a taste of its own medicine and that, just like the The Sun's dramatic announcement at the Labour conference, his timing was impeccable.