PARIS (AFP) - France has never faced so great a terrorist threat, its prime minister said on Thursday, as he unveiled controversial new laws allowing spies to hoover up phone and Internet data from suspected Islamists.
The measures have been criticised by rights groups and set the government up for potential clashes with Internet companies who are under public pressure to ensure privacy.
But in the wake of the Islamist attacks in Paris in January, and coming a day after the Tunisian museum shootings that killed two French tourists, the government said the measures were vital for effective policing.
"There cannot be a lawless zone in the digital space," said Prime Minister Manuel Valls.
"Because we often cannot predict the threat, the services must have the power to react quickly." The new law allows authorities to spy on the digital and mobile communications of anyone linked to a "terrorist" enquiry without prior authorisation from a judge, and forces Internet Service Providers (ISPs) and phone companies to give up data upon request.
Intelligence services will have the right to place cameras and recording devices in private dwellings and install "keylogger" devices that record every key stroke on a targeted computer.
The authorities will have the right to keep recordings for a month, and metadata for five years.
Valls sought to allay fears that the law was a French version of the "Patriot Act", which was introduced by the United States in response to the attacks on September 11, 2001, giving intelligence agencies broad powers to spy on its citizens.
Procedures will be "precisely defined", any request for data will have to be "justified" and decisions to begin surveillance will be taken personally by the prime minister and will be for a limited time.
"It in no way allows a generalised surveillance of citizens," said Valls.
"Everyone can express their concerns, but our responsibility is to fight terrorism in the most effective way possible." France is one of the last Western countries to pass comprehensive legislation governing modern surveillance - still relying on a law passed in the pre-Internet days of 1991.
But civil rights activists have heavily criticised the bill.
The head of the country's Human Rights League, Pierre Tartakowsky, said: "We are putting in place a system that is potentially killing freedom.
"On the pretext of improving surveillance, we are sacrificing individual liberties." However, polls show that the French want to step up surveillance in the wake of the January attacks that shook the country and left 17 dead.
An Ipsos survey for Europe 1 radio station and Le Monde daily at the end of January showed 71 percent of people were in favour of general bugging without the need to get a warrant from a judge.