MI5 removed and destroyed the files of a judge who was investigating security force collusion in the 1989 murder of the Belfast solicitor Patrick Finucane, it has been reported.

MI5 agents entered the office of Peter Cory, who was appointed in 2002 by the British and Irish governments to re-examine certain killings in the Northern Ireland Troubles, and removed computer hard discs that were then wiped, according to a BBC documentary to be aired on Tuesday.

The incident happened in 2002 more than a decade after MI5 had infiltrated the Ulster Defence Association (UDA) loyalist paramilitary group, according to Spotlight on the Troubles: A Secret History.

The programme, reported by Mandy McAuley, also shone a light on the Democratic Unionist party’s (DUP) alleged flirtation with a shadowy group that imported guns used in dozens of sectarian murders.

The murder of Finucane – shot 14 times in front of his wife and children – is a notorious case that has fuelled claims that the British state operated death squads during the Troubles. Finucane had defended Irish Republican Army suspects.

Lord Stevens, a former Metropolitan police commissioner who headed official inquiries into loyalist killings, confirmed to the programme that MI5 cited security reasons for removing and destroying the judge’s files.

Cory’s investigation proceeded – he retained paper records that MI5 did not obtain – but his recommendation for a public inquiry was ignored. Earlier this year the supreme court ruled that a 2011 investigation into Finucane’s murder was ineffective and failed to meet the standards required under human rights law.

MI5 had three agents in the UDA and tried to poach Brian Nelson, an army agent in the paramilitary group, as an additional source, the programme reported.

The programme also said Willie Frazer, a prominent Protestant victims’ campaigner who died earlier this year, secretly helped funnel weapons to loyalist paramilitary groups in the early 1990s. Ulster Resistance, a quasi-paramilitary group, imported the arsenal via South Africa.

They were a “godsend”, said Johnny Adair, a UDA leader. “With that armoury … came confidence to the men. Where they were no longer running into these areas with shotguns or 38 special handguns, they were now going in with assault rifles, deadly assault rifles.”

The weapons were used in more than 70 murders, including the Loughinisland massacre.

DUP leaders – Ian Paisley Sr, Peter Robinson and Sammy Wilson – helped launch Ulster Resistance in 1986. They later distanced themselves from the group.

The group’s chief arms smuggler was Noel Little, the BBC programme alleged, citing French secret police documents relating to a South African arms dealer named Douglas Bernhardt. Little, who is the father of the DUP MP Emma Little-Pengelly, denied the allegation.