Legislation allowing the mass retention of communications data will have to be rewritten following a High Court ruling that sections of the Data Retention and Investigatory Powers Act 2014 (DRIPA) are inconsistent with EU law. 

The Law Society, which had intervened in a challenge brought by two MPs represented by campaign group Liberty, welcomed the ruling.

In David Davis MP, Tom Watson MP, Peter Brice and Geoffrey Lewis v Secretary of State for the Home Department Lord Justice Bean and Mr Justice Collins said that DRIPA fails to lay down clear rules for accessing retained data that are limited to defined serious offences and subject to judicial or independent oversight.

DRIPA had been rushed through parliament after the Court of Justice of the European Union ruled the existing EU Directive on data retention invalid because it was so sweeping in its interference with individual privacy rights.

The judgment ordered that section 1 of the act be disapplied. DRIPA will remain in force until the end of March 2016. The government is expected to lay a new bill before parliament this autumn.

At the time of its passage as emergency legislation the Law Society criticised DRIPA on the grounds that the legislation was an affront to parliamentary sovereignty and the rule of law, first in failing to offer sufficient time for parliamentary scrutiny and debate and secondly in overruling a considered judgment of the European Court of Justice (ECJ). 

The Society's intervention outlined its concern about the effect of the legislation on legal and professional privilege. 

Today’s judgment acknowledges that ‘communications with lawyers do need special consideration’.

Jonathan Smithers (pictured), president of the Law Society said: ‘The Law Society is pleased that our concerns have been heard and that the High Court has recognised the importance of legal professional privilege.

‘We have seen a growing number of instances where data and surveillance powers have been seriously and repeatedly overused.

‘This has included police using secret methods to expose journalistic sources and to monitor journalists’ activities and it has also been revealed that the intelligence agencies have been spying on conversations between lawyers and their clients.’

James Welch, legal director for Liberty, said: ‘Campaigners, MPs across the political spectrum, and the government’s own reviewer of terrorism legislation are all calling for judicial oversight and clearer safeguards. The High Court has now added its voice, ruling key provisions of DRIPA unlawful.

‘Now is the time for the home secretary to commit publicly to surveillance conducted with proper respect for privacy, democracy and the rule of law – not plough on with more of the same.’

David Davis, Conservative MP for Haltemprice and Howden, said: ‘The court has recognised what was clear to many last year, that the government’s hasty and ill-thought-through legislation is fatally flawed. ‘They will now have to rewrite the law to require judicial or independent approval before accessing innocent people’s data.

‘This change will improve both privacy and security, as whilst the government gave parliament one day to consider its law, the court has given almost nine months.’

Counsel and solicitors acting for Mr Davis and Mr Watson, to their very great credit, have acted pro bono, and pursuant to an agreement reached with the Government Legal Department they do not seek a pro bono costs order. In their case, therefore, there will be no order as to costs.