Appeal judges have ruled the Government’s former mass data surveillance powers were unlawful.

Lord Lloyd Jones Sir Geoffrey Vos and Lord Justice Patten said the previous regime for accessing and storing phone and internet communications was “inconsistent” with European Union law.

Their ruling at the Court of Appeal on Tuesday relates to the Data Retention and Investigatory Powers Act 2014 (Dripa), which critics said allowed police and security services to “spy on citizens”.

It is the latest development in an action which was originally brought by Conservative Minister David Davis, Labour deputy leader Tom Watson and campaigners Peter Brice and Geoffrey Lewis, supported by human rights organisation Liberty.

Deputy Labour leader Tom Watson, who brought a case against the Government over data retention which judges have ruled on at the Court of Appeal (Stefan Rousseau/PA)

Following the ruling, Liberty claimed the Government’s replacement for Dripa, which was repealed in 2016, is also effectively unlawful.

The judges previously asked the Court of Justice of the European Union (CJEU) to answer questions before reaching their decision on an appeal brought in 2015, by then home secretary Theresa May, against an earlier ruling that the data laws were flawed.

Lord Lloyd Jones said Dripa was inconsistent with EU law because it allowed data retention in circumstances where its use was “not restricted solely to fighting serious crime”, and where access was not “reviewed by a court or independent authority”.

Speaking after the ruling, Mr Watson said: “This legislation was flawed from the start.

“It was rushed through Parliament just before recess without proper parliamentary scrutiny.

“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.

“I’m proud to have played my part in safeguarding citizen’s fundamental rights.”

Dripa was repealed in December 2016 and its data retention powers were replaced by part of the Investigatory Powers Act 2016 – dubbed the “snooper’s charter”by critics – which is subject to another legal challenge by Liberty, due to be heard next month.

A separate case has been referred to the CJEU, asking judges there to clarify the law on data retention in a “national security context”.

But Lord Lloyd Jones said these other actions did not make the Appeal Court’s latest intervention a “pointless exercise”.

Breaking: Court of Appeal has ruled the Government IS breaking the law by collecting the nation's internet activity and phone records and letting public bodies grant themselves access with no suspicion of serious crime and no independent sign-off https://t.co/MAOek83YFLpic.twitter.com/KyKGINwdmH