BRUSSELS -- A European Union judge says an EU agreement to exchange air passenger information with Canada to combat terrorism should be revised because parts of it would infringe on people's rights.

Advocate General Paolo Mengozzi said in a legal opinion published Wednesday that the deal signed in 2014 should not enter force in its current form.

The agreement was referred to the EU's Court of Justice by the European Parliament over privacy concerns.

Under it, Canadian authorities would have access to the data of European travellers like contact details, credit card and other personal information.

Mengozzi said parts of the agreement go beyond what is strictly necessary to prevent serious crime.

Such legal opinions are not binding but they are respected by the EU court in most rulings.