GCHQ unlawfully spied on British citizens, a secretive UK court has ruled. The decision could mean GCHQ will be forced to delete the information it acquired from people that were spied on.

The Investigatory Powers Tribunal (IPT), the secretive court that was created to keep Britain’s intelligence agencies in check, said that GCHQ’s access to information intercepted by the NSA breached human rights laws.

The court found that the collection contravened Article 8 of the European Convention on Human Rights, which protects the right to a private and family life. It also breaches Article 6, which protects the right to a fair trial.

The breaches open up the possibility of anyone who "reasonably believes" they were spied on to ask for the information that GCHQ holds on them to be deleted.

Citizens can send complaints to the IPT to find out whether they were spied on and ask for a deletion. Some of the privacy groups that brought the complaint are beginning proceedings to do so.

The IPT has never ruled against any intelligence agency since it was set up in 2000. It found in December that GCHQ’s access to the data was lawful from that point onward, and it re-affirmed that decision today. That ruling is now being appealed.

GCHQ pointed to that decision in its response to today's ruling, which it said it welcomed.

A GCHQ spokesperson said: "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."

But the court said today that historical collection was unlawful because the rules governing how the UK could access information received from the NSA were kept secret.

It concerned practises disclosed as part of documents disclosed by Edward Snowden, and related to information found through the NSA’s PRISM and UPSTREAM surveillance programmes.

PRISM allegedly allowed the NSA access to data from companies including Google, Facebook, Microsoft and Skype. UPSTREAM allowed the NSA to intercept data through the fibre optic cables that power the internet.

The ruling comes after a legal challenge brought by civil liberties groups Privacy International, Bytes for All, Amnesty International and Liberty. Some of those groups will now seek to find whether their information was collected through the programmes and 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,” said Eric King, deputy director of Privacy International. “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.”

But GCHQ argued that the decision was based on a technicality.

“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," a spokesperson said. "We welcome the important role the IPT has played in ensuring that the public regime is sufficiently detailed.