Friday's decision was the final step before the law can come into effect.

The bill was proposed long before the January attacks in Paris by Islamic extremists, but the government said that had added to its urgency.

One measure will force communication and Internet firms to allow intelligence services to install electronic "lock-boxes" to record metadata from all Internet users in France, allowing algorithmic analysis to detect potentially suspicious behavior.

The data will be anonymous, but intelligence agents could follow up with a request to an independent panel for deeper surveillance that could identify users.

The measure has drawn harsh criticism from advocates of civil liberties.

Think your friends should see this? Share it with them!

Story copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Feedback, Corrections and Other Requests: AP welcomes feedback and comments from readers. Send an email to info@ap.org and it will be forwarded to the appropriate editor or reporter.