The arrest of two Northern Irish journalists after they embarrassed authorities by obtaining documents relating to a mass murder “was the kind of operation more associated with a police state than with a liberal democracy”, a court has heard.

Northern Irish police raided the homes and offices of the award-winning journalists Trevor Birney and Barry McCaffrey last August over the alleged theft of a police watchdog report, in a case that has gained global attention owing to concerns over its impact on press freedom in Britain.

The unredacted document was obtained by the journalists as part of their investigation into the murders of six Catholic men by masked gunmen in a pub in Loughinisland, County Down, in 1994. Their work named alleged murderers and highlighted collusion between the police and Ulster Volunteer Force (UVF).

Despite widespread claims that police know the identities of the killers, no one has been convicted of the murders. Birney and McCaffrey’s work was used in the film No Stone Unturned, which was directed by the Oscar winner Alex Gibney.

The pair have been on bail awaiting charge since last August, unable to travel across international borders without giving police three days’ notice. The case has been contrasted with the UK government’s campaign for press freedom elsewhere in the world, with the activist group Reporters Without Borders raising concerns about the arrests.

Opening a judicial review case in Belfast on Tuesday, Barry Macdonald QC told the court of appeal in Belfast that investigative journalists and their sources were supposed to be protected from such intrusion. “This operation sets off alarm bells and flashing blue lights amongst media organisations,” he said. “It set off alarm bells because of the grave implications for freedom of the press.”

He said the judge who granted the search warrant did not have issues surrounding the protection of journalistic sources properly in mind: “The judge effectively unfortunately allowed himself to be used by a single-minded police officer who had his own agenda.”

He claimed there was no risk to suspects named in the documentary since their names had been in the public domain for years and they had refused to take up an offer from filmmakers to respond.

Officers appeared to search every desk in the journalists’ office and take material unrelated to the Loughinisland massacre, including one surrounding alleged clerical child sex abuse, Macdonald said.

Judicial review proceedings have been brought in an attempt to have the warrants declared unlawful. Police have given an undertaking not to examine any of the documents and computer equipment pending the outcome of the legal action.

The Police Service of Northern Ireland (PSNI) chief constable, George Hamilton, citing a potential conflict of interest, had asked Durham constabulary to take on the investigation after the film’s release.

The National Union of Journalists has been campaigning for the police to abandon the case. “Now more than ever we need critical, bold, outstanding investigative journalism that is in the public interest. Democracy is in danger without it,” said its general secretary, Michelle Stanistreet.

In a 2016 report, the police ombudsman, Dr Michael Maguire, concluded the security forces had colluded with the UVF and said there were “catastrophic failings” by the authorities.

The Conservative MP David Davis travelled to Northern Ireland to support the journalists in their legal case. “Press freedom is the most fundamental freedom in modern society because it protects all the other freedoms,” he said outside court.

“Protecting press freedom is not just about protecting journalists, it is about protecting their whistleblowers and their witnesses, it is about protecting the ability to expose wrongdoing and expose failure and that is what these journalists are doing and they don’t deserve to go through what they are going through now.

“Their cause is so important it should be known throughout the whole of the UK and the rest of the world.”