A British court has ruled that some aspects of the sharing of mass surveillance intelligence by the U.K and the U.S, was unlawful.

The Investigatory Powers Tribunal (IPT) said that the U.K.’s General Communication HQ’s access to intercepted information obtained by the U.S.’s National Security Agency (NSA) failed to comply with human rights laws, the Guardian reports.

Civil liberties groups including Liberty and Privacy International had brought the complaint to the IPT last year. This was the first legal challenge to be examined in the U.K. over GCHQ’s participation in the NSA’s mass surveillance programs, Prism and Upstream, whose existence was first revealed by NSA whistleblower Edward Snowden in June 2013.

Read next: UK spy agency stored millions of webcam images

[Guardian]

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Naina Bajekal at naina.bajekal@time.com.