A top European Union legal expert has advised scrapping an EU-US agreement under which airline passenger data is released to the US authorities.
The US has tightened flight security since the 9/11 attacks
Passenger lists have been handed over to US customs since May last year, in what the US sees as a key measure to combat terrorism.
But the European parliament objected to the potential violation of privacy.
The advocate-general of the European Court of Justice has now said the deal goes beyond the EU's powers.
Philippe Leger said the European Commission and EU governments should not have taken decisions concerning security and the fight against terror, as they come under national, not EU law.
But he dismissed the breach of privacy argument.
The full court will make a final ruling, but it usually accepts the opinions of its advisers, known as advocates-general.
The release of passenger data was required by the US authorities after the terror attacks on New York and Washington on 11 September, 2001.