As I noted last week, the phone hacking scandal was swiftly exploited by opponents of a free press for political gain. Not only did they use the actions of some to press for new restrictions on the freedoms of the whole media, culminating in the absurd provisions of Section 40 of the Crime and Courts Act, but they also sought to elaborate the issue into a more general story about supposedly widespread criminality.

Ever eager for a high profile, big budget crusade, the Metropolitan Police and the Crown Prosecution Service were more than happy to take up the cudgels. Operation Elveden spent millions of pounds and untold thousands of police officer hours investigating reporters who allegedly paid money to police sources for leaks and tip-offs.

There were some quite significant problems in chasing journalists for doing so. The ethical implications of prosecuting reporters for public interest reporting ought to have given prosecutors pause, but it didn’t. If ethics didn’t trouble them, legality certainly should have – as David Allen Green has recounted, the CPS struggled to find a legal basis on which to charge them.

And yet, armed with what Green calls a “misconceived Heath Robinson piece of legal daftness”, the authorities went ahead. Twenty-nine cases were brought. Some were eventually dropped (though often not before the accused were left mouldering on police bail, unable to get on with their lives, for months and even years), some were rejected by juries, and others were overturned on appeal. Yesterday, the last remaining conviction was quashed.

Millions of pounds spent, numerous lives seriously disrupted, 29 cases brought and not a single successful, standing conviction to show for it. Operation Elveden, inspired by a Twitterstorm, conceived in a hurry and pursued with a flawed legal justification, has been a disaster.

It is of course better for the acquitted reporters that they have eventually had their names cleared. But it would obviously have been far better had they not been dragged through this fiasco in the first place. The police and the CPS ought to answer serious questions about why this course of action ever seemed either appropriate or legally justified. The campaigners who egged them on, some of whom have fallen notably silent on the topic, ought to apologise for their actions. (With impressive but unsurprising gall, Hacked Off has simply used the news as an opportunity to demand that The Sun apologise for its actions.)

The press seem to have learned more from the experience than either their pursuers or their accusers. Once upon a time it was commonplace in the red-tops in particular to see civil liberties denounced as simply cover for paedophiles and terrorists, “nothing to hide, nothing to fear” and all the rest of it. That position has become less popular on Fleet Street in recent years – understandably, given that numerous reporters have personally found out what there is to fear even when you’re innocent.