According to a new ruling handed down today by a secret UK court, the GCHQ—essentially the UK equivalent of the National Security Agency—unlawfully spied on British citizens. The ruling pertains to the intelligence sharing between the USA and UK, where the GCHQ had access to the NSA's Prism and Upstream programs. Basically, because the rules that governed the UK's access to Prism and Upstream were kept secret, the GCHQ contravened two Articles of the European Convention of Human Rights—the right to freedom of expression and information and the right to private and family life.

When Edward Snowden released thousands of sensitive documents in 2013, detailing many of the NSA's signals intelligence programs, it was clear that a lot of the data was being shared with Five Eyes—an intelligence alliance consisting of the US, UK, Canada, New Zealand, and Australia. Armed with this new information, civil liberties groups like Privacy International, Bytes for All, and Amnesty International leapt into action.

Back in 2013, Privacy International filed a complaint over the GCHQ's behavior with the Investigatory Powers Tribunal (IPT)—a secret, independent court that hears complaints about surveillance overreach by the UK government. In December 2014, the IPT ruled that the GCHQ's future intelligence sharing with the NSA was lawful because the programs were no longer secret. Today, the IPT ruled that the intelligence sharing that occurred before December 2014 was unlawful because the details of the arrangement were secret and thus contravened Articles 8 and 10 of the European Convention of Human Rights (ECHR).

Here's the IPT's ruling:

IT IS DECLARED

(i) THAT prior to the disclosures made and referred to in the First Judgment and the Second Judgment, 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 pursuant to Prism and/or (on the Claimants’ case) Upstream, contravened Articles 8 or 10 ECHR, but

(ii) THAT it now complies with the said Articles.

"It does not need to be this way," said Privacy International. "Our intelligence agencies do not need to be run relying on secret interpretations of secret laws. With independent reviews of RIPA already underway, we hope this success encourages the call for root and branch reform, to bring our intelligence agencies under the rule of law once and for all."

Privacy International will now appeal the second portion of the IPT's ruling—that the GCHQ-NSA arrangement does not violate human rights going forward—at the European Court of Human Rights.