Details have emerged of how a plot by a neo-Nazi to kill an MP and a serving police officer was foiled by an anti-racism charity that had infiltrated the group.

Just over a year had passed since the murder of Labour MP Jo Cox when Robbie Mullen joined comrades from Britain’s only banned neo-Nazi group in the Friar Penketh, a bustling Wetherspoons pub in Warrington town centre.

But as the drizzly evening in the summer of 2017 wore on, Mullen and others from the group known as National Action were joined by Jack Renshaw, a 22-year-old former politics student from Lancashire. After embarking on a journey through the far right in his teens, he was by then under investigation over antisemitic speeches at rallies in Blackpool and Leeds, and also expected to be charged with grooming two young boys for sexual exploitation.

“He looked all serious, and he looked sad at the same time,” Mullen would later recall of the moment Renshaw made a shocking admission. “Then he told us about his plan to kill his local MP.”

Fortunately for Rosie Cooper, the West Lancashire Labour MP who Renshaw had decided to kill, as well as DC Victoria Henderson, who was investigating him, Mullen had by this point rejected the violent racist ideology of National Action and was working as a mole for anti-racism charity Hope Not Hate (HnH).

After Mullen tipped off his handler, HnH’s research director, Matthew Collins, Renshaw was arrested by police, who found a 48cm (19in) Roman-style machete concealed in an airing cupboard.

While Renshaw admitted to a terrorist plot to kill his MP, it is only now that the full background to the plot has been aired. At the end this week of his fourth and final trial of the past two years, a jury decided it was unable to decide whether Renshaw was a member of National Action.

In some ways, what is just as dramatic was HnH’s penetration of National Action and the charity’s role in the demise of a violent neo-Nazi group that had venerated the killer of Jo Cox and that had gone underground and continued to operate after it was proscribed by the home secretary in 2016.

“We have people in all of the organised far-right groups, obviously, but we were really hammering NA hard in the run-up to its proscription,” said Collins, who 27 years ago was instrumental in destroying a previous incarnation of the National Front when he became a mole for the anti-fascist organisation Searchlight.

The problem, Collins told the Guardian on Wednesday, was that HnH knew NA would continue to exist even after it was banned by Amber Rudd.

“No one ever really had anyone inside National Action – the security services may have had one person a year ago though we believed they were quite ineffectual – but we had Robbie inside NA for months and months, and really struck gold because he was also senior and worked with its secretive leadership.”

Mullen, a warehouse worker living in Runcorn, Cheshire, had joined NA in 2015 after becoming impressed with what felt like a different, even innovative, type of far-right group. Clad all in black at demonstrations, it was adept at using social media to recruit disaffected young men. As well as engaging in street violence, it had carried out set-piece propaganda actions such as dropping a banner from a motorway bridge or unfurling a “Hitler Was Right” banner in central Liverpool.

After researching HnH and reading Collins’s book about his own life, and having become disillusioned with the far right, Mullen emailed the charity in April 2017 before taking a train to meet in London in circumstances that wouldn’t be out of place in a John le Carré novel.

“We have what we call bagmen and bagwomen, who are people around the country that do nothing else other than this sort of work for us,” said Collins. “We booked him a ticket on the train and unbeknownst to him we had two people on it to ensure he got on it and didn’t have anyone else with him. Then we spirited him away to a hotel.

“This was a group that was was highly sophisticated and very cultlike, so we hatched a plan to get him out and to also sow disharmony and humiliate it. We were halfway through that when Renshaw decided he wanted to murder Rosie Cooper.”

After an initially tense relationship with the police, who Collins said wanted Mullen to be “handed over to them”, cooperation with counter-terrorism officers took an improved turn. A series of convictions of NA members all stemmed from information that came from the charity.

Among the National Action members convicted last November of being part of a terrorist group were a “fanatical” neo-Nazi couple who named their baby son after Hitler, and a Finnish-born British army soldier who was arrested at his army base in Wales. The National Action leader, Christopher Lythgoe, who had reacted to its proscription by telling members they would “shed just one skin for another”, was jailed for eight years in July.

Mullen, who was informed by police that his life was under threat, has now had to embark on a new life. In a way, he admits, his life has been ruined.

“By reporting Jack Renshaw’s murder plot and giving evidence in this court, my life has changed,” he said. “I had to walk out of my job, I was forced to move home and I have to live with a target on my back. But I know I had no other choice. Jack Renshaw was days away from trying to kill an MP, Rosie Cooper.

“I now want to get on with the rest of my life. I hope that in doing so, and in rebuilding my life, I can encourage others to take a different path than I did.”