The Guardian/YouTube screenshot by Chris Matyszczyk/CNET

A top UK intelligence agency, the Government Communications Headquarters, engaged in unlawful spying until late 2014, a tribunal ruled Friday.

The Investigatory Powers Tribunal ruled Friday that the GCHQ's use of intercepted data collected by the US National Security Agency for its own investigations was illegal. The tribunal found that through its partnership with the US agency and sharing of data through the NSA's widely criticized Prism and other programs, the UK agency accessed personal information on individuals and violated their human rights, specifically to privacy and free speech.

Since December, however, GCHQ has been in compliance with disclosure laws, detailing to authorities the data it's receiving and how it's using it, the tribunal said.

The IPT, which has never ruled against the intelligence agency in its 15-year history despite being one of the few courts to have that power, said Friday that the GCHQ for years failed to provide adequate disclosures on what kind of information it was obtaining.

The case against the GCHQ was brought by several human rights organizations, including Liberty and Privacy International. The charged were leveled after former NSA contractor Edward Snowden two years ago began exposing details on the US agency's widespread collection of user data on the Internet through its Prism program.

Launched in 2007, Prism was initially designed as an antiterrorism tool that allowed the NSA to access Internet information from technology companies and analyze that for possible threats. The program, according to the leaked documents, allowed the NSA to collect everything from emails to chat information to photos. Practically everything that is shared on the Internet is collected through the program and subsequently swept by the NSA. That data, according to the reports, was then shared with the GCHQ to help that agency in its own efforts.

While government officials in support of the NSA and GCHQ have argued that data is collected only with a warrant and for use in antiterrorism activities, critics have said that Prism provides an unimpeded opportunity for the government agencies to collect whatever they want, whenever they want, from anyone they want.

The ruling may not amount to much more than a slap on the wrist. While the IPT found the GCHQ in violation of human rights in previous years, the tribunal said that the agency is now in full compliance with the law. In a statement, GCHQ says that the "judgment focuses primarily on a discrete and purely historical issue," adding that it believes the ruing shows that its agency was actually in compliance with guidelines on privacy.

At issue, according to the GCHQ, was its initial unwillingness to share certain information on its activities to the public. By not sharing that "two paragraphs" of information, which the GCHQ did not identify in its statement, the IPT found the agency "in contravention of human rights law."

The intelligence agency emphasized the positive aspect of the tribunal's Friday ruling.

"We are pleased that the Court has once again ruled that the UK's bulk interception regime is fully lawful," a GCHQ spokesperson said in defense of the agency.The person continued: