Facebook said it has done nothing wrong, after a successful legal challenge surrounding concerns the social network might be sharing European citizens' personal data with US cyberspies.

The tech giant said it relied on a number of legal methods to transfer data from Europe to the US unconnected to the Safe Harbour EU/US treaty which gives US firms access to the online information of millions of EU citizens.

But Facebook warned governments needed to provide reliable methods for the exchange of information and resolve issues surrounding national security.

A spokesman said: "This case is not about Facebook. The advocate general (who advised the European Court of Justice) himself said that Facebook has done nothing wrong.

"What is at issue is one of the mechanisms that European law provides to enable essential transatlantic data flows.

"Facebook, like many thousands of European companies, relies on a number of the methods prescribed by EU law to legally transfer data to the US from Europe, aside from Safe Harbour.

"It is imperative that EU and US governments ensure that they continue to provide reliable methods for lawful data transfers and resolve any issues relating to national security."

There is no suggestion that Facebook is operating unlawfully.

A company source stressed that the advocate general opinion stated: "the present case does not amount to a breach by Facebook of the Safe Harbour principles".

The ruling threatening Safe Harbour affects thousands of companies other than Facebook.

Facebook has already put in place alternatives to the treaty mechanisms but many smaller firms may not have.

It is understood Facebook will continue operating as normal. The organisation has stressed that it does not give US security agencies access to data.

Many businesses want to simplify the transfer of information between continents and the source expressed concern about the impact the ruling could have on that.

"It will make business much more difficult, adding an extra layer of complex regulation on top of that."

Max Schrems, who took the case to the European court, said the judgment would clearly apply to alternative transfer methods in cases of mass surveillance.

"The Court of Justice EU has not argued only under the Safe Harbour decision, but has based the judgment on fundamental rights that apply no matter which transfer methods are used by Facebook," he said.