Emergency surveillance law rushed through parliament last year has been deemed unlawful by the UK High Court.
The court found that sections 1 and 2 of the Data Retention and Investigatory Powers Act 2014 (DRIPA) are incompatible with EU human rights legislation.
The law, which gained Royal Assent on 17 July last year, allows the UK home secretary to order companies to retain communications data for up to 12 months.
This data includes emails, texts, phone records and even communications from journalists, MPs, doctors and lawyers that may be considered confidential or privileged.
Judges ruled that the government will have until March 2016 to amend the legislation, after which the unlawful sections will cease to have effect.
Government have nine months to bring back new legislation. MPs were given one day to discuss the legislation last year.— tom_watson (@tom_watson) July 17, 2015
James Welch, legal director for Liberty, has claimed public dissent against surveillance law is growing and called for "fundamental reform" of the UK spying apparatus.
"Campaigners, MPs across the political spectrum, the government's own reviewer of terrorism legislation are all calling for judicial oversight and clearer safeguards," he said.
"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," he added after the ruling.
Labour MP Tom Watson has called for a proper framework and surveillance law oversight to be established.
"The government gave MPs one day to discuss the legislation, which was wrongly represented as respectful of people's right to privacy," he said.
Meanwhile, Conservative MP David Davis welcomed the ruling of the High Court.
"The court has recognised what was clear to many last year, that the government's hasty and ill-thought through legislation is fatally flawed," he said.
"They will now have to rewrite the law to require judicial or independent approval before accessing innocent people's data, reflecting the new consensus amongst experts in the Anderson and RUSI reports."
Comcast's £29.7bn winning bid more than twice the £13.7bn Rupert Murdoch valued Sky at just eight years ago
A nuclear strike has been considered, but Bruce Willis is nowhere in sight
Spray-on antenna could enable seamless integration of antennas with everyday objects
Parker Solar Probe, TESS and GOLD missions will deliver exciting data, claims NASA