Twenty years ago today (9 November), amid panic in Whitehall, government lawyers told prosecutors to abandon the trial of three company executives accused of selling arms-related equipment to Saddam Hussein's Iraq in breach of export controls.

The trial of Paul Henderson, managing director of the Coventry-based machine tool firm, Matrix Churchill, and two colleagues, collapsed after Alan Clark, Margaret Thatcher's notoriously maverick trade minister, told the court he had encouraged the company to turn a blind eye to the military uses to which their equipment could be put by Iraqi scientists. In effect, he gave the company a nod and a wink.

The jury had already heard that during his business trips to Baghdad and elsewhere in Iraq, Henderson had been spying for MI6. In court, his MI6 handler described Henderson as "a very brave man".

MI6 – then, just as 10 years later, as the Blair government's 2002 Iraqi weapons dossier so embarrassingly demonstrated – was desperate to get any nuggets it could about what Saddam was up to. The only difference was that the Iraqi dictator was the west's friend in his war of attrition with Iran, and became an enemy only after he invaded Kuwait in 1990.

The collapse of the Matrix Churchill trial in November 1992 forced the prime minister, John Major, to set up an inquiry into what went wrong. The inquiry, under a senior judge, Sir Richard Scott, unearthed a series of miscarriages of justice and outrageous behaviour by senior customs and Foreign Office officials involved in criminal prosecutions.

Sir Brian Unwin, then head of customs, blamed it on "equivocation" on the part of the Foreign Office, Ministry of Defence, and the Department of Trade and Industry, "in relation to the policy on the enforcement of sanctions".

The euphemism covered a multitude of sins which Scott found out. Three appeal court judges condemned senior officials for silencing witnesses and a prosecuting counsel described the way his case was handled by officials as "indefensible".

As a result of the Scott inquiry, the appeal court quashed a string of convictions - of Ali Daghir, managing director of Euromac, of Paul Grecian, managing director of Ordtec, and of Reginald Dunk, of the trading firm, Atlantic Commercial.

That some of those wrongfully convicted or charged won compensation was largely due to the perseverance of a lawyer with long experience of official wrongdoing, Lawrence Kormornick. He won a record £2m plus for Dunk.

He also won £5m for James Edmiston, managing director of the Sterling machine gun manufacturer. Edmiston was charged with Dunk but acquitted. However, the charges forced him to sell the company and he was later declared bankrupt.

It took 25 years for Edmiston to get compensation under a wrongful charge scheme stopped by the Labour government soon after it decided Edmiston should benefit from it (the size of the award took into account his role as a director on an annual salary in 1983, when he was first charged, of £100,000).

David Cameron has told Edmiston that a formal apology would not be "appropriate" and that James should be satisfied with his record award. The Ministry of Justice has said there are no plans to re-introduce the wrongful charge scheme.

Kormornick, who as I have already mentioned has written an account of the saga with Edmiston, describes the decisions as regrettable and says the 20th anniversary of the collapse of the Matrix Churchill case was a golden opportunity finally to draw a line under the whole affair.

Geoffrey Robertson QC, Henderson's defence counsel, recently described the way the Dunk and Edmiston case was conducted as "a massive abuse of power". Pressure was put on witnesses not to give evidence. "Memories are short and people may forget what happened," added Robertson.

The cases provide a classic study in the abuse of unaccountable power by arrogant government officials. They are also a healthy reminder about just how murky Whitehall's dealings with the arms trade, and the spooks, can become.