The European Court of Human Rights (ECHR) ruled Thursday that British intelligence’s mass surveillance of private communications online is illegal.

The Guardian reported that the court found the the Government Communications Headquarters (GCHQ) had failed to put safeguards in place while surveilling the digital communications, violating Article 8 of the European convention on human rights.

However, the ECHR ruled that the processes used to share the intelligence with foreign governments was not in violation of privacy or human rights standards.

ADVERTISEMENT

The Guardian noted that the ruling is the first major legal blow to U.K. intelligence’s bulk interception and surveillance of private messages.

Former National Security Agency contractor Edward Snowden first disclosed the practice in 2013, revealing that GCHQ had been intercepting and holding onto data about the private communications of millions of people.

A collection of 14 human rights organizations, journalists and privacy groups had told the court that the practices were in violation of human rights.

Snowden on Thursday tweeted that the judgement was a victory.