US spy chiefs can be blocked from accessing online data of European citizens, a court has ruled.

In what is being billed as a landmark decision, the European Court of Justice (ECJ) issued its opinion after Austrian campaigner Max Schrems challenged Facebook over the transfer of his personal information to American intelligence agencies.

The Luxembourg court found the Safe Harbor agreement between the US and Europe, which gives spies access to huge banks of data, does not stop watchdogs from investigating complaints or bar them from suspending the transfers.

The arrangement allows the National Security Agency (NSA) to use the Prism surveillance system exposed by whistleblower Edward Snowden to wade through billions of bits of personal data, communication and information held by nine internet giants.

Mr Schrems said the ruling could have major implications for EU-US data flows and US internet companies operating in Europe.

“After an initial review of the advocate general’s opinion of more than 40 pages it seems like years of work could pay off. Now we just have to hope that the judges of the Court of Justice will follow the advocate general’s opinion in principle,” he said.

In his opinion, which the ECJ said is not binding, Advocate General Yves Bot found that data transfers are an important and necessary element of the transatlantic relationship between the US and Europe.

But he warned that the European rules which govern it are invalid.

In one of the most damning findings, the ECJ said the access US spies have to European data interferes with the right to respect for private life and protection of personal data.

It said internet users in Europe have no effective judicial protection while the large scale data transfers are happening.

The ECJ branded the US spying as “mass, indiscriminate surveillance”