The European Court of Justice has said that a directive adopted in 2006 violates the respect for people privates lives, subsequently declaring it "invalid".
The EU Data Retention Directive allowed the storing of data for up to two years on the identity of citizens, including the times, locations and frequency of their communications.
"By requiring the retention of those data and by allowing the competent national authorities to access those data, the directive interferes in a particularly serious manner the court in Luxembourg ruled, according to the BBC.
"[it interferes with] the fundamental rights to respect private life and to the protection of personal data,"
The judges conceded that at the time of the legislation data retention was required to fight against serious crime. They added, however, that the actions taken in the directive were unbalanced.
The UK government has said that it is considering the implications, while the Austrian and Irish courts have complained, asking if the directive complies with the EU Charter of Fundamental Rights instead.
Despite the judges ruling that the legislation did not provide sufficient safeguards to stop abuse, have enough clarity regarding why data needed to be held and that it would make people feel watched, a British government spokesman labelled it "fundamental":
"We cannot be in a position where service providers are unable to retain this data," he added.
A new data protection law is currently being drafted, amid complaints from some of the EU member nations.