The judgement stated: “The Supreme Court holds that the balance of the public interest clearly lies against disclosure of the two gists.”

The PSNI chief constable Jon Boutcher had supported releasing the information.

Judges said they had “considerable sympathy with the desire of the chief constable to demonstrate that the PSNI is seeking to be transparent”.

They added: “The national security interest should not be treated as a point of dispute between the chief constable and the secretary of state to be brought to court for a resolution.

“In the case of disagreement… the ordinary position is likely to be that the court will look to the secretary of state for the relevant assessment.”

Campaigners believe the outcome will have implications for state secrecy in other Troubles legacy cases.

Amnesty International, Relatives for Justice and the Committee on the Administration of Justice (CAJ) had supported Mr Thompson’s family.

They said the case raised “critical questions” about the government’s Neither Confirm Nor Deny (NCND) policy, which is used “to prevent the disclosure of information on national security grounds”.

Daniel Holder, Director of CAJ said there was a concern the ruling would enable a secretary of state “to conceal the involvement of state agents” in Troubles’ killings and violations.

“The ruling itself implies that doing so is an appropriate application of the governments’ NCND policy,” he said.

“This is despite ministers being ultimately responsible for the security agencies that were running the agents.”

Gráinne Teggart, Northern Ireland Deputy Director of Amnesty International UK, added: “Today is a grim day for truth.

“National security cannot be a blank cheque to conceal state wrongdoing or human rights violations.”