The British agent known as Stakeknife was entrusted with the IRA’s internal investigation into the deaths of eight IRA members in an SAS ambush in Loughgall, Co Armagh, in 1987, a BBC documentary has revealed.

Spotlight on the Troubles: A Secret History - which was broadcast on Tuesday night - also found that the IRA was so heavily infiltrated, the security forces knew of the planned attack ten days before it took place.

Reporter Jennifer O’Leary obtained copies of the executive summary of the still unpublished Stalker/Sampson reports of the 1980s into allegations of a shoot-to-kill policy.

These portray, she says, “a massive cover-up by the guardians of the law, one in which police officers were instructed to lie to detectives and prosecutors and in which senior police and MI5 officers destroyed evidence, all in the name of protecting an informer and other intelligence sources.”

According to Spotlight, both reports recommended prosecutions of members of the police and MI5 “but it was decided that pursuing those cases in court would run contrary to the interests of national security.”

The documentary also states that the Thatcher government was aware that British agents “also had blood on their hands”.

Raymond White, a former senior RUC Special Branch officer, said he personally asked Mrs Thatcher for legal clarity on running agents in paramilitary organisations like the IRA.

“We had a ten minute conversation about that,” he said, “and the message at the end of the day I think that came back was more or less, ‘well carry on doing what you’re doing but don’t get yourself caught’.”

Greatest loss of life

The Loughgall deaths represented the IRA’s single greatest loss of life during the Troubles. Part of the IRA’s East Tyrone brigade, they were ambushed by the SAS as they attacked the village’s police station. A civilian was also killed.

Ignatius Harte, whose late brother Gerard was the ‘local’ IRA man entrusted with the investigation into Loughgall, told the programme his understanding was that his brother “would have been going back to Stakeknife with all the information that was being collected.

“Stakeknife was getting the full information and that was being relayed back to his handlers.”

Stakeknife is identified in the programme as west Belfast man Freddie Scappaticci. O’Leary describes him as “for decades, one of Britain’s best spies”, who was in charge of IRA investigations into security breaches.

Scappaticci has previously denied he is Stakeknife.

Lord Ramsbotham, the British army’s Brigade Commander in Belfast from 1970-80, told the programme that “the famous Stakeknife” was handed on to him in 1978 “as being an important person. He was obviously someone who had access to the higher levels of the IRA.”

A former member of the IRA, Anthony McIntyre, said Stakeknife “knew who the players were. This was the Clapham Junction of the IRA, everything had to go through him.”

The programme also plays a secret recording from the 1990s of Scappaticci describing his interrogation techniques.

“The reality of it is, if Freddie Scappaticci was dealing with internal security in Tyrone, which we now know he was,” said Iganius Harte, “obviously that was a leading role in how so many operations were carried out in Tyrone.”

The activities of Stakeknife are currently under investigation in Operation Kenova, a £35m inquiry into allegations of the agent’s involvement in up to 50 murders.