The Irish High Court has referred to a 14-year-old agreement governing the exchange of personal data between the European Union and the U.S. to the EU’s top court.

The referral, on Wednesday, came in a case over whether the Irish Data Protection Commissioner was right to refuse to investigate Facebook’s alleged involvement with the U.S. government surveillance program Prism.

Europe-v-Facebook, an Austrian group representing some Facebook users, filed a complaint with the Irish DPC over Facebook’s data exportation regime in June last year. It argued that when Facebook collects user data and exports it to the U.S. it is giving the U.S. National Security Agency (NSA) the opportunity to use the data for massive surveillance of personal information without probable cause—and by doing so, Facebook is violating European laws.

The Irish DPC became involved because Facebook’s European subsidiary, responsible for the data of the company’s users outside the U.S. and Canada, is registered in Ireland and falls under its jurisdiction. However, it refused to investigate Europe-v-Facebook’s complaint, arguing that there were no grounds for an investigation since Facebook’s data exportation is covered by the EU-U.S. “safe harbor” agreement.

European laws prohibit the transfer of personal data to non-EU countries that do not meet the EU’s standards for data protection. The EU and the U.S. together developed the “safe harbor” framework under which U.S. firms can undertake to provide protection for data on EU citizens as strong as that required by EU legislation. For example, companies must show that they prevent penetration of their networks.

Not satisfied with the DPC’s response, Europe-v-Facebook asked the Irish High Court to review and reverse the DPC’s refusal.

The Irish High Court however referred the case to the Court of Justice of the European Union (CJEU), Europe-v-Facebook said Tuesday, calling the decision a “very unexpected, but great turn,” adding that this means that Europe’s top court is going to review the safe harbor agreements.

It asked the CJEU whether a data protection authority such as the DPC is absolutely bound by a European Commission decision from 2000. In that decision the Commission said that personal data transferred to a third country such as the U.S. is considered adequately protected if the companies that process the data adhere to safe harbor principles.

The High Court said in its ruling that Europe-v-Facebook’s objection is really to the terms of the Safe Harbor regime rather than to the manner in which the DPC applied the regime.

“There is, perhaps, much to be said for the argument that the Safe Harbor Regime has been overtaken by events. The Snowden revelations may be thought to have exposed gaping holes in the contemporary U.S. data protection practice,” the High Court said, adding that the safe harbor agreements as such have not been challenged.

However, if the Irish DPC is not allowed to disregard the Commission’s 2000 decision, Europe-v-Facebook’s complaint must fail, the High Court said.

Given the novelty and the practical importance of these issues which have considerable practical implications for all 28 EU member states, this question should be determined by the CJEU, the High Court said.

The referral is “the best thing that could have possibly happened,” said Europe-v-Facebook’s front man Max Schrems on Twitter.