What is really going on in politics? Get our daily email briefing straight to your inbox Sign up Thank you for subscribing We have more newsletters Show me See our privacy notice Invalid Email

The Brexit Secretary has taken the Prime Minister to an EU court and won, in a victory for anti-surveillance campaigners.

A group successfully brought a case against parts of Theresa May's Snooper's Charter.

Butin an embarrassing moment for the Prime Minister's Brexit team, one of the leading figures in the group was David Davis, the minister responsible for taking Britain out of the EU - and the court's jurisdiction.

The group, which also included Deputy Labour leader Tom Watson, challenged Mrs May's Investigatory Powers Act, which covers state surveillance.

The court ruled parts of the law, which allows the government to collect and keep the internet and phone records of every UK citizen, are unlawful.

It means significant parts of Mrs May’s Investigatory Powers Act (IPA), a pet project while she was Home Secretary, are unlawful and must be changed.

The original challenge was to the Data Retention and Investigatory Powers Act (DRIPA) - a temporary law set to expire on December 31.

But last month, Parliament passed the IPA, which vastly expanded the same powers to collect and store citizens' data without a warrant.

DRIPA forces communications companies to store every person’s “communications data” – the who, what, when, where and how of every email, text, phone call, and internet communication, including those of lawyers, doctors, MPs and journalists.

EU judges ruled that DRIPA breaks the law because it "allows general and indiscriminate retention of all communications data."

The IPA widened the scope of the law, allowing dozens of public bodies - including the NHS and Department for Work and Pensions - to access the records without suspicion of serious criminality.

(Image: Getty)

Tom Watson said: “This ruling shows it's counter-productive to rush new laws through Parliament without a proper scrutiny.

“At a time when we face a real and ever-present terrorist threat, the security forces may require access to personal information none of us would normally hand over. That's why it's absolutely vital that proper safeguards are put in place to ensure this power is not abused, as it has been in the recent past.

“Most of us can accept that our privacy may occasionally be compromised in the interests of keeping us safe, but no one would consent to giving the police or the government the power to arbitrarily seize our phone records or emails to use as they see fit. It's for judges, not Ministers, to oversee these powers. I'm pleased the court has upheld the earlier decision of the UK courts.”

Martha Spurrier, Director of Liberty, who backed the legal challenge said: “Today’s judgment upholds the rights of ordinary British people not to have their personal lives spied on without good reason or an independent warrant. The Government must now make urgent changes to the Investigatory Powers Act to comply with this.

“This is the first serious post-referendum test for our Government’s commitment to protecting human rights and the rule of law. The UK may have voted to leave the EU – but we didn't vote to abandon our rights and freedoms.”

A Home Office Spokesperson said: “We are disappointed with the judgment from the European Court of Justice and will be considering its potential implications.

“It will now be for the Court of Appeal to determine the case. The Government will be putting forward robust arguments to the Court of Appeal about the strength of our existing regime for communications data retention and access.

“Given the importance of communications data to preventing and detecting crime, we will ensure plans are in place so that the police and other public authorities can continue to acquire such data in a way that is consistent with EU law and our obligation to protect the public.”