Bulk interception of external communications is critical to the UK’s national security, James Eadie QC, for the government, told the European Court of Human Rights this month. There was a ‘pressing need’ for the security and intelligence agencies to acquire and assess large quantities of data. Without a haystack to search, analysts could never discover whether it was hiding an unknown needle.

Eadie was responding to challenges from several privacy, media and human rights campaigners represented by Dinah Rose QC. Her main argument was that the three UK agencies – MI5, MI6 and GCHQ – were breaking the law by failing to show sufficient respect for people’s private lives.

Appearing before seven judges across a vast Strasbourg courtroom, the two Blackstone Chambers silks put on a bravura performance. Eadie, in particular, had to answer impromptu technical questions from six of the judges – something that would have floored many advocates. And, if the court’s 17-judge grand chamber decides to hear an appeal from whichever side loses, there is every chance we shall be treated to an encore in two or three years’ time.

But those watching from the public seats may have wondered whether this was a show they had seen before. Hadn’t there been a preview in London at the Investigatory Powers Tribunal? Certainly, the storylines were familiar: how many of their capabilities can the agencies disclose without damaging their effectiveness? How much privacy should we sacrifice to protect against terrorists, paedophiles and others who pose serious threats to our safety and security?

‘Nothing that we say today should be taken in any way to seek to minimise or understate the seriousness of these threats,’ insisted Rose. ‘Combating these threats requires concerted police and intelligence activity, including the use of covert surveillance and interception of communications.’

‘My learned friend Ms Rose acknowledged the security threat, didn’t seek to minimise it, and then moved on,’ replied Eadie. ‘That, we respectfully submit, is not good enough. There was no attempt to grapple with the very specific problems that we sought to identify.’

To illustrate those problems he gave anonymised examples of the agencies’ targets, including an airline worker who had been willing to launch a terrorist attack within the UK. ‘Without access to bulk data and its examination,’ said Eadie, ‘it is highly unlikely he would have been identified.’

It goes against the grain for GCHQ and the other agencies to name specific targets. But from a few more clues provided by David Anderson QC in his review of bulk powers last year, one does not need much intelligence to work out that Eadie must have been referring to Rajib Karim, a former British Airways software engineer convicted in 2011 of preparing acts of terrorism. Sentencing him to 30 years, the judge praised Scotland Yard’s counter-terrorism command for decrypting Karim’s coded messages. What was not reported at the time was that GCHQ had used bulk data to monitor Anwar al-Awlaki, an al-Qaida preacher then based in Yemen. Analysing that data had led to Karim’s identification and arrest.

It was not until 2013 that we learned about the use of bulk powers from Edward Snowden, who leaked classified information taken from US National Security Agency systems. In his report last year, Anderson said he neither condoned Snowden’s actions nor underestimated the damage they had done. But some in the agencies have since accepted that Snowden drew attention to an undemocratic level of public deception. As Anderson put it, ‘broad and obscure powers were being exercised in a manner that few had understood’.

The agencies’ use of so-called bulk personal datasets were not avowed – publicly acknowledged – until 2015. Until avowal, according to a ruling from the Investigatory Powers Tribunal in October 2016, the collection and use of huge quantities of data – most of which related to people in whom the agencies had no interest – had not been sufficiently accessible or foreseeable to have complied with the human rights convention.

But the government’s case amounted to no more than ‘trust us and we’ll keep you safe’, Rose told the Strasbourg court. ‘What my learned friend refers to as safeguards are simply provisions saying officials of the agencies must themselves make a judgement when they’re deciding what material to collect, what material to keep, what material to search and what material to examine… The reality is that there is no independent mechanism which can hold them accountable for that judgment.’

Not yet, there isn’t. But the Investigatory Powers Act 2016, when fully in force, will provide much greater transparency and introduce significant judicial supervision.

‘That’s an issue for another day,’ said Rose. ‘We do not accept that the new safeguards are sufficient.’

Maybe not. But that will certainly be the government’s answer if it loses this important case.