A judge has ruled that online spying conducted by UK government intelligence officers does not violate European human rights standards on free speech and privacy.
The Investigatory Powers Tribunal ruled that mass collection of data without checks would be illegal - but said that GCHQ's methods fall short of violating that principle.
It said that GCHQ selects and stores data to a high enough degree to make its actions legal - despite allegations that spies are regularly peaking into our webcams, email, and basically anything you consider private on the internet.
The practices were revealed largely thanks to documents released by US whistleblower Edward Snowden.
The judges ruled that GCHQ's methods do not breach article 8 of the European Convention on Human Rights.
"We have been able to satisfy ourselves that as of today there is no contravention of articles 8 and 10 by reference to those systems.
"We have left open for further argument the question as to whether prior hereto there has been a breach."
Several of the groups who helped to raise the complaint, including Amnesty UK, Liberty and Privacy International, said they will appeal the decision.
James Welch, legal director for civil rights organisation Liberty, told the BBC:
"So a secretive court thinks that secret safeguards shown to it in secret are an adequate protection of our privacy.
"The IPT cannot grasp why so many of us are deeply troubled about GCHQ's Tempora operation - a seemingly unfettered power to rifle through our online communications."