A surveillance law that was rushed through the France’s parliament in the wake of the terror attack on Charlie Hebdo in 2015 has been ruled unconstitutional by the French Constitutional Council.

The council opposed the law on the basis that it contained no sufficient definitions or parameters as to what kind of surveillance operations were allowed or how they might be challenged. In short, spies were given open access to the population’s metadata.

In what one journalist called the “French equivalent to the Patriot Act,” intelligence agencies were given the freedom to intercept and monitor communications with very little oversight. Intelligence operatives could gather communications data in real time directly from internet service providers without prior authorization.

At the time, Amnesty International had described it as “a major blow to human rights,” standing alongside civil liberties groups and France’s Pirate Party in opposition.

Although the law will likely remain in force for at least the next year, yesterday’s council ruling is a victory for internet rights organization La Quadrature du Net (LQDN) whose formal complaint led to the decision.