PARIS — French legislators are set to approve a new law on Tuesday granting the state sweeping powers to spy on its citizens despite criticism from rights groups that the bill is vague and intrusive.
The law is one of several government reforms in the wake of a jihadist killing spree in January that left 17 dead and saw the capital gripped with fear for three days.
France is still on high alert as it has received repeated threats from jihadist groups abroad and was reminded of the peril of homegrown extremism when police thwarted a planned attack on a church two weeks ago.
The parliamentary bill enjoys support from both main parties and is almost certain to be adopted when legislators vote on Tuesday, despite opposition from the far-left and greens.
Amnesty International has also protested against the legislation, warning it will take France "a step closer to a surveillance state".
"This bill is too vague, too far-reaching and leaves too many unanswered questions. Parliament should ensure that measures meant to protect people from terror should not violate their basic rights," said Amnesty’s Europe director, Gauri van Gulik.
The new law will allow authorities to spy on the digital and mobile communications of anyone linked to a "terrorist" inquiry without prior authorisation from a judge, and forces internet service providers and phone companies to give up data on 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 in real time.
The authorities will be able to keep recordings for a month, and metadata for five years.
Prime Minister Manuel Valls has fiercely defended the bill, saying that to compare it to the mass surveillance Patriot Act introduced in the US after the 9/11 attacks was a "lie".
He has pointed out that the previous law on wiretapping dates back to 1991, "when there were no mobile phones or internet", which makes the new bill crucial in the face of extremist threats.
France decided to shake up its spy laws after the January 7-9 attacks on Charlie Hebdo magazine, a policewoman and a Jewish supermarket that sent shock waves around the world. Hundreds of its citizens — more than any other European country — have left to join militant groups such as the Islamic State group in Iraq and Syria and fears are high they may return to carry out attacks on home soil.
After an Algerian was recently arrested purely by chance before carrying out an attack on a church, Mr Valls warned the country had never "had to face this kind of terrorism in our history".
Perhaps the most controversial of the bill’s proposals are so-called "black boxes" — or complex algorithms — that internet providers will be forced to install to flag up a pattern of suspicious behaviour online such as what keywords someone types, what sites they consult and who they contact and when.
A poll published in April showed that nearly two-thirds of French people were in favour of restricting freedoms in the name of fighting extremism.
Only 32% of those surveyed in the CSA poll for the Atlantico news website said they were opposed to freedoms being reduced, although this proportion rose significantly among young people.
However, the national digital council, an independent advisory body, has come out against the proposed legislation.
The group said it was akin to "mass surveillance", which had "been shown to be extremely inefficient in the US".
It also said it was "unsuited to the challenges of countering terrorist recruitment" and "does not provide sufficient guarantees in terms of freedoms".
After it is voted by the lower house national assembly, the bill will move to the upper house senate for further debate.