A mass surveillance programme by the UK government breached human rights, the European Court of Human Rights has ruled.
In a major case brought by charities including Amnesty and human rights group Big Brother Watch, the ECHR ruled that Article 8 - a right to private life - was breached by a "bulk interception regime".
The case was brought after revelations from US whistleblower Edward Snowden revealed British surveillance and intelligence sharing practices.
An operation dubbed 'TEMPORA' allowed intelligence services "to tap into and store huge volumes of data".
In a ruling published today, the court ruled there was insufficient monitoring of the interception of information.
The court also found that "the regime for obtaining communications data from communications service providers" violated the same part of the code of human rights.
The regime also violated article 10, the court ruled, because there was not enough protection to ensure the safety of confidential journalistic sources.
However, the court ruled that sharing the information with foreign governments did not break the code.
In a statement, the court said: "While the Court was satisfied that the intelligence services of the United Kingdom take their Convention obligations seriously and are not abusing their powers, it found that there was inadequate independent oversight of the selection and search processes involved in the operation - in particular when it came to selecting the Internet bearers for interception and choosing the selectors and search criteria used to filter and select intercepted communications for examination.
"Furthermore, there were no real safeguards applicable to the selection of related communications data for examination, even though this data could reveal a great deal about a person’s habits and contacts."
Three applications - from Big Brother Watch, the Bureau of Investigative Journalism, and 10 human rights charities - were joined together, and were lodged after Mr Snowden's revelations.
All applicants felt their line of work meant they were more subject to having their communications intercepted by intelligence services.
Big Brother Watch praised the ruling as a "landmark judgement".
Silkie Carlo, director of the organisation, observed: "Under the guise of counter-terrorism, the UK has adopted the most authoritarian surveillance regime of any Western state, corroding democracy itself and the rights of the British public.
"This judgment is a vital step towards protecting millions of law-abiding citizens from unjustified intrusion. However, since the new Investigatory Powers Act [the so-called Snoopers' Charter in the UK] arguably poses an ever greater threat to civil liberties, our work is far from over."