Making the UK a safe place to live and prosper is not a small matter. Whatever the root causes, the threats to public safety are real and a political priority for government and opposition alike. This huge responsibility combined with the complexities of 21st century communications has resulted in a succession of laws aimed at legitimising the ability of law enforcement and intelligence agencies to tap into our digital lives. Just like technology itself, this is a moving target and policy decisions in this area have come thick and fast – not just in the UK but in many other democracies around the world.

The recent High Court decision upholding the challenge to the data retention obligations of the Data Retention and Investigatory Powers Act 2014 (DRIPA) by two UK Members of Parliament – David Davis (Con) and Tom Watson (Lab) – is a sign of the need for democratic diligence in the political decision-making process. No one could reasonably accuse the court of being unbalanced. The 44-page long decision is carefully crafted and, whilst ruling that DRIPA’s requirements are unclear and lacking in oversight, it gives the government the opportunity to rectify these serious flaws until 31 March 2016.

This decision reflects a loud and clear message that has been heard from the most sober and authoritative corners of the legal system for quite some time. In a similar vein to this year’s High Court decision, last year’s judgment by the Court of Justice of the European Union (CJEU) annulling the EU Data Retention Directive was not meant to be a blind statement against surveillance. The CJEU’s aim was to provide balanced parameters for the lawful retention of communications data dealing with the scope of data capture, the triggers for access, the retention periods and oversight.

More recently, David Anderson QC’s report of the investigatory powers review, A Question of Trust, explained in meticulous detail a number of findings and recommendations which set out a path to find the right balance between the need for state access to communications data and the respect for citizens’ privacy. The most basic condition to strike that balance is a clear and democratic framework that meets the highest standards of legislative rigour. This is something which is also considered in the DRIPA High Court decision and that the government will need to reflect upon.

In line with this thinking, an equally authoritative report, A Democratic Licence to Operate, delivered by the Independent Surveillance Review (ISR) to the Prime Minister, makes the case for data retention and access laws that are fully compliant with the human rights framework. Both the Anderson report and the ISR report reiterate the essential oversight of the executive power by the judiciary. Of course, the exercise of judicial oversight must ensure no loss of operational efficiency, but the centuries-old ‘separation of powers’ principle is as relevant now as ever before.

What this means is that as the UK government approaches its decision-making on the draft Communications Data Bill, more democratic scrutiny rather than less can only be better. Surveillance will and must continue. But the consequences of taking things too far will seriously undermine the very values that our democratic government is trying to defend in the first place. The answer is to have an open and public debate that leads to a thorough legislative process without hyperbole and paranoia in order to deliver a legal framework that stands up to the courts’ scrutiny.

This entry originally appeared on Linkedin.