Prosecutors have been compelled to admit that a covert operation in which an undercover police officer used a fake identity in court to conceal his secret mission caused a miscarriage of justice. They conceded that an environmental campaigner would probably not have been prosecuted if it had been revealed at his original trial that one of his co-defendants was an undercover officer who gave evidence on oath under the guise of his fake identity.

The Crown Prosecution Service (CPS) acknowledged last year that the conviction of John Jordan for assaulting a police officer during a pro-cycling protest needed to be quashed, but for months refused to say why. They made the admission on Wednesday after the campaigner, along with the Guardian, BBC’s Newsnight and the Press Association, applied for an explanation for the overturning of the conviction.

An official inquiry is scrutinising how many campaigners in recent decades have been wrongly convicted because of the involvement of undercover officers. So far the number of campaigners identified as having thus been wrongly convicted or prosecuted stands at 56.

In the latest case, prosecutors at Southwark crown court admitted that an individual prosecuted alongside Jordan was an undercover officer who had adopted the fake identity of Jim Sutton. Richard Whittam, QC for the crown, told judge Alistair McCreath: “Had the Crown Prosecution Service known that ‘Jim Sutton’ was an undercover police officer, there is a strong likelihood that John Jordan would not have been prosecuted.” He added that throughout the prosecution, Sutton was “deployed as an undercover police officer”.

When the officer – real name Jim Boyling – was arrested in 1996, he told arresting officers that he was Jim Sutton, a cleaner from east London. He maintained this fiction throughout the prosecution, even when he went into the witness box to give evidence to prosecutors and defence barristers at the original trial in 1997. Jordan and the others being prosecuted were not told that the man they knew as Sutton was engaged in a five-year operation infiltrating environmental and animal rights groups.

But Boyling was a member of the Special Demonstration Squad, the covert Scotland Yard unit that adopted fake personas usually for periods of five years and infiltrated more than 460 political groups between 1968 and 2008. In recent years, it has emerged that some officers in the unit formed sexual relationships with women in the groups they had been sent to infiltrate, and that they spied on the family of murdered teenager Stephen Lawrence.

Peter Francis, an ex-undercover officer who has blown the whistle on his former unit, has revealed how senior officers on occasions authorised spies to appear in court as their alter egos. He said that being prosecuted helped to increase their credibility with the people they were spying on. After the hearing, Francis hailed “the sheer tenacity and investigative skills of the activists and their solicitors” who had exposed the latest miscarriage of justice.

In August 1996, Boyling, Jordan and other campaigners were arrested and charged with a public order offence after occupying a government office. All were represented by the same civil liberties law firm, Bindmans, as they discussed their defence strategy over several months. After a three-day hearing at Westminster magistrates court in January 1997, Jordan was convicted and given a conditional discharge for a year, while Boyling and the others were acquitted. Boyling was unmasked as an undercover officer in 2011 following investigations by activists and their lawyer.

Prosecutors are resisting calls to publish a document giving further details of why the conviction was unsafe. The judge will sit again to decide whether it should be made public.