Ruling in the case which was brought by a group of journalists and rights activists, Europe's top rights court in Strasbourg, France, said Thursday the interception of journalistic material also violated the right to freedom of information.
The ECHR judges voted by five to two that the mass trawling for information violated Article 8 of the European Convention on Human Rights guaranteeing the right to privacy, ruling that the safeguards governing the selection of the data were "inadequate".
“While the Court was satisfied that the intelligence services of the United Kingdom take their (European human rights) 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,” the court said in a statement, Presstv reported.
However, the European court also ruled that sharing information gained with foreign governments did not break any codes.
The UK surveillance program was revealed by American whistleblower Edward Snowden as part of his sensational leaks on US and British spying practices.
Snowden revealed that US and UK intelligence services had been collecting bulk data, including telephone calls, messages and internet communication, whether or not people were suspected of a crime.
During an interview with the The Guardian newspaper, Snowden warned that the practices of UK's Government Communications Headquarters (GCHQ) were "worse than the US.”
Snowden, who worked for the Central Intelligence Agency (CIA) and National Security Agency (NSA), is still living in exile in Russia after leaking the information.
Since the legal challenge began, Britain has been forced to reform its surveillance laws, and the government claims that there is new legislation that contains more privacy protections.
Civil liberties campaigners who brought the case hailed the judgment as a landmark victory against the mass surveillance that governments have defended as an important tool in fighting terrorism.
Silkie Carlo, director of Big Brother Watch, a British civil liberties and privacy campaigning organization, said the ruling “vindicates Mr. Snowden’s courageous whistleblowing.”
“Under the guise of counterterrorism, the UK has adopted the most authoritarian surveillance regime of any Western state, corroding democracy itself and the rights of the British public,” Carlo said in a statement. “This judgment is a vital step towards protecting millions of law-abiding citizens from unjustified intrusion.”