In 2009 I attended the wedding of News International chief executive Rebekah Brooks. The ceremony took place by a lake, at a country estate. I stood next to TV presenter Piers Morgan, while Paul Dacre, Daily Mail editor, was a few yards away. Rupert Murdoch was closer to the action. David Cameron hung back up the slope. Gordon Brown, then prime minister, arrived late, with all eyes turning to him as he walked down to the lake.

At the reception I had a brief conversation with Mr Cameron. I said I hoped he would not win the upcoming election, but that if he did, and if he wanted to act to improve political debate and standards in the press, I would support him. For some time the journalist in me had known that the relationship between politics and the media was not serving the public. But it was my first-hand experience of this developing culture of abuse and negativity that convinced me Britain’s press and 24-hour news were making it more difficult for elected leaders to govern.

“It’s got worse, hasn’t it?” he said. I replied that he would be a much stronger prime minister were he to take office not feeling he owed anything to the big media groups. At that point Mr Murdoch joined us, and we changed the subject. Perhaps we should not have done so. That we did, however, illustrated something of the dishonesty at the heart of what are essentially political and commercial relationships.

It is not easy to do what Ed Miliband, Labour leader, did last week, making himself an enemy of some of the media’s most powerful forces. He was right that Labour got too close to News International. But he was also right that, given the media bias against us, he knew why we tried to level the playing field.

In my own defence, and as my diaries show, I argued for some years with Tony Blair that we needed to act on the culture of our media. At one point he ticked me off, asking that I not make my views so obvious in front of Mr Murdoch, his son James and Les Hinton, then chief executive of News International. Ultimately, Mr Blair thought the press had become a problem but that given all our other priorities, people would not understand our taking them on. He also thought it would look like revenge for the fact they had turned against us. And there were political considerations too: trying to govern, and win elections, is hard enough without the press being against you.

I accept that, for all of us, at times media support was something we courted at the expense of positions of principle on media issues. But that trap has now been sprung.

The latest revelations have forced the police, News International and the government to act. The police will now be more vigorous. News International will continue with their kamikaze crisis management, which one day will be studied as a textbook case of how not to do it. But the most important developments are the prime minister’s dual inquiries into press practices and a new system of regulation. These mean we now have a once in a generation opportunity for a new settlement between politics, the media and the public. Nobody can argue that we have the press we deserve. Pressured by technological change, a dominant strain of Britain’s media has gone into a spiral of decline, in which this scandal is only the most dramatic development.

Mr Cameron did not look comfortable announcing the reviews. He has personal relationships at stake and, given he hired Andy Coulson as his communications director, his judgment is too. Already the backlash from parts of the press has begun as they seek to maintain that anything but toothless self-regulation is an assault on a free press. But Mr Cameron must stand back from all of that, and ask himself: “what is the right thing to do?” He did some of it last Friday.

The judicial inquiry should be far-reaching. The News of the World is far from alone in the use of dubious and illegal practices, as widely ignored reports from the Information Commissioner have shown. Parts of Britain’s media remind me of the trade unions before Mrs Thatcher. They feel untouchable.

As I say above, Labour could and should have done more to deal with “the feral beast”. But just as the MPs’ expenses scandal emerged from the failure of Mrs Thatcher’s government to tackle MPs’ salaries, so the system by which she showered honours on editors and owners – a practice to which we put an end, with a rule that no serving editor could be honoured – means she too has something to answer for.

Whatever the past, it is Mr Cameron who must lead the country to a better place. Mr Miliband has shown himself capable of playing a good and principled part. And so should the public. Ultimately political debate will only improve if the public want it to, if they channel the anger at recent events into an assessment of what kind of papers they read, whether they really want to live on a diet of celebrity, trivia, negativity and abuse. To coin a phrase, we’re all in this together.