Mass surveillance of internet communications by British intelligence agency GCHQ was ‘unlawful’ until the end of 2014, a court has ruled.

The Investigatory Powers Tribunal (IPT) announced on Friday that the security agency’s access to information obtained by the US National Security Agency (NSA) was in breach of human rights law.

The ruling suggests that the intelligence-sharing operations between the US and UK were illegal for at least seven years, beginning with the Prism intercept program’s introduction in 2007 to the end of 2014.

This landmark ruling is the first time since the IPT’s establishment in 2000 that a complaint against any UK intelligence agencies has been upheld.

The decision, posted on the IPT’s website on Friday morning, said the activities of GCHQ didn’t comply with articles 8 or 10 of the European Convention of Human Rights. Article 8 refers to the right to private family life and 10 to freedom of expression.

“The regime governing the soliciting, receiving, storing and transmitting by UK authorities of private communications of individuals located in the UK, which have been obtained by US authorities … contravened Articles 8 or 10,” the document read.

READ MORE:British spies threaten to stop working with Germans if NSA probe taken further

The challenges to mass surveillance techniques, brought by human rights groups Liberty and Privacy International among others, claimed that GCHQ and NSA information collection practices were illegal.

The legal regime has been updated to ensure compliance, and a judgment issued by the tribunal in December found the current system doesn’t violate human rights.

The extent of the shared communication interceptions was revealed by NSA whistleblower Edward Snowden. Lawyers said that by receiving information from the NSA, GHCQ was bypassing the UK’s legal system.

A GCHQ spokesperson, however, said the ruling only affected a small area of data collection.

“We are pleased that the court has once again ruled that the UK’s bulk interception regime is fully lawful. It follows the court’s clear rejection of accusations of ‘mass surveillance’ in their December judgment.”

“The IPT has, however, found against the government in one small respect in relation to the historic intelligence-sharing legal regime,” they added.

The spokesperson further said the decision “re-affirmed” their commitment to the intelligence-sharing procedure.

READ MORE:Infamous 'Regin' malware linked to Snowden's NSA files

“Today’s IPT ruling re-affirms that the processes and safeguards within the intelligence-sharing regime were fully adequate at all times – it is simply about the amount of detail about those processes and safeguards that needed to be in the public domain.

“We welcome the important role the IPT has played in ensuring that the public regime is sufficiently detailed.”

They also explained that secrecy was the nature of GCHQ’s work.

“By its nature, much of GCHQ’s work must remain secret. But we are working with the rest of government to improve public understanding about what we do and the strong legal and policy framework that underpins all our work.”

“We continue to do what we can to place information safely into the public domain that can help to achieve this.”

Eric King, Deputy Director of Privacy International, gave a positive response to the decision.

“For far too long, intelligence agencies like GCHQ and NSA have acted like they are above the law,” he said.

“Today’s decision confirms to the public what many have said all along — over the past decade, GCHQ and the NSA have been engaged in an illegal mass surveillance sharing program that has affected millions of people around the world.”

King added that GCHQ must not be allowed to continue the practice of mass surveillance, and praised Edward Snowden, saying the verdict “vindicated” his actions.