The PSNI failed in a legal bid to view BBC NI's Spotlight documentary into the Claudy bombing before it was broadcast on Tuesday night.
Lawyers for the chief constable sought a last-minute High Court injunction to try to view the programme.
If that was not permitted, they wanted to stop it from being broadcast.
Nine people were killed in the attacks in 1972, but no-one has ever been convicted over it.
One concern of the police was that suspects or witnesses in the investigation could be named in the documentary.
But the judge dismissed the case saying it was based on speculation about the programme's contents, and it was an unprecedented application by the police.
Mr Justice Treacy also ordered the police to pay for the costs of the case.
Nine people died in bombings in Claudy, County Londonderry on 31 July 1972.
It was one of the worst atrocities of the Northern Ireland troubles.
A report by the NI Police Ombudsman which was published in August said the police, the state and the Catholic Church had covered up a priest's suspected role in the bombing.
It found that detectives had concluded that the late Fr James Chesney, who was later moved to the Irish Republic, was a suspect.
No action was ever taken against Fr Chesney, who died in 1980.
Northern Ireland Secretary Owen Paterson said that the government was "profoundly sorry" that Fr Chesney had not been properly investigated.
The programme was screened on BBC1 on Tuesday night.