Story highlights

(CNN)Airlines flying in and out of Europe Union countries will now share passenger data with authorities -- part of new efforts to thwart terror on the continent.

The European Parliament voted 461-179 Thursday for the measure that requires airlines to share passenger data with the national security agencies of member countries. Nine legislators abstained.

"We have adopted an important new tool for fighting terrorists and traffickers," said Timothy Kirkhope, a member of the European Parliament behind the plan, in a statement. "By collecting, sharing and analyzing ... information, our intelligence agencies can detect patterns of suspicious behavior to be followed up (on)."

There are limits to what data airlines must pass on. The measure specifies that passenger details can only be shared for the express purpose of "preventing, directing, investigating or prosecuting terrorist offenses or serious crime."

European security agencies can keep this information for five years. But, after six months, all records will be stripped of any details that identify specific passengers.

The measure applies to all flights that come into or leave EU nations. It's up to the 28 member states whether it also affects "intra-UE" flights -- namely, those trips that start and end within the union -- if the EU Commission is notified.