The UK government may have to scale back parts of a law that forces ISPs to keep record of citizens' browsing history for at least a year and other targeted surveillance measures.

According to a report from The Guardian, the UK's Court of Appeal has deemed the Data Retention and Investigatory Powers Act (DRIPA) was "inconsistent with EU law" and did not adequately restrict access to confidential phone and web browsing history by the government without oversight.

The original "Snoopers' Charter" was originally laid out in 2012 as a way to give police and intelligence agencies access to citizens' online lifestyles, geolocation data, and phone usage. Then Home Secretary Theresa May said the bill was to be a "vital tool for the police to catch criminals and to protect children." She added that the bill did not allow reading of content, merely the communication record itself.

Former Labour MP Tom Watson led the case against DRIPA in 2014 and said in a statement:

“This legislation was flawed from the start. It was rushed through Parliament just before recess without proper parliamentary scrutiny,” said Watson. “The government must now bring forward changes to the Investigatory Powers Act to ensure that hundreds of thousands of people, many of whom are innocent victims or witnesses to crime, are protected by a system of independent approval for access to communications data.”

In a move to possibly preempt the ruling, the UK's Home Office (roughly equivalent to the U.S. Dept. of Homeland Security) attempted to curtail powers itself by disallowing senior police officers to self-authorize access to communication data and requiring approval from a new "investigatory powers commissioner". However, Watson disregarded the move as "half-baked".

The ruling follows a similar path as the European Court of Justice who ruled in December 2016 that the retention of confidential communication data was illegal unless proper safeguards were put in place, including an independent judicial review.

This ruling is also certainly a win for civil liberties advocates who have been fighting passionately against mass surveilence in the years following the disclosures from Edward Snowden. Martha Spurrier, director of human rights group Liberty who also represented Watson for this case, commented saying "No politician is above the law. When willl the government stop bartering with judges and start drawing up a surveillance law that upholds our democratic freedoms?"

With the need for cyber-security protection growing exponentially, the continuing fight between privacy and security will continue to rage on although one can only hope that a meaningful balance can be struck eventually.