The mass surveillance of the Internet conducted by the Government Communications Headquarters (GCHQ), a British intelligence and security organization, was unlawful, according to a ruling by the Investigatory Powers Tribunal (IPT), a secretive court that was created to monitor Britain’s intelligence agencies.

According to the IPT ruling, GCHQ’s access to information, intercepted by the U.S. National Security Agency (NSA), violated Article 8 of the European Convention on Human Rights, which protects the right to a private and family life. In addition, the GCHQ spying also breached the rights to a fair trial, The Independent reported, adding that the latest court ruling could eventually allow people to ask GCHQ to delete any information.

In December, IPT found that GCHQ’s access to the data did not violate any law. But, the court said Friday that the collection of the data was illegal because the rules that administer how the U.K. could access information received from the NSA’s mass surveillance programs, Prism and Upstream, were kept secret.

The latest ruling came after a legal challenge was brought by civil liberties groups, including Privacy International, Bytes for All, Amnesty International and Liberty. According to The Independent, some of these groups are expected to find if GCHQ holds information about them and may ask for that information to be deleted.

“For far too long, intelligence agencies like GCHQ and NSA have acted like they are above the law,” Eric King, deputy director of Privacy International, was quoted by The Independent, as saying. “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.”