The French government plans greater surveillance of extremist websites to help prevent terrorist attacks.
A new counterterrorism and intelligence bill setting out the plans was unveiled on Wednesday.
The bill was formally presented in a Cabinet meeting days after a French police official was killed inside her police station in what authorities are investigating as a terrorist attack.
This week, 20 retired generals warned in an open letter of a possible military takeover and bloody civil war in response to what they characterised as the disintegration of a country under Islamist extremism.
In a news conference on Wednesday, Interior Minister Gerald Darmanin said the bill would strengthen French intelligence services' power to monitor people's online activities.
Extremists “are using less and less phone lines and more and more internet connections,” he said.
One measure will extend the use by French intelligence services of algorithms to track down extremists online, a method that has been trialled since 2015 to monitor messaging apps.
Mr Darmanin said that using algorithms would enable intelligence services to spot someone who has accessed extremist websites several times.
Jamel Gorchen, the Tunisian national who last week killed a police employee in Rambouillet, south of Paris, watched extremist videos before carrying out his attack, a counterterrorism prosecutor said.
Prime Minister Jean Castex said the bill had been part of the government's broader counterterrorism policies since the beginning of French President Emmanuel Macron's term in 2017.
Several security laws have been passed, about 1,900 additional intelligence jobs have been created and 36 attacks have been thwarted over the past four years, Mr Castex said. In 2019, the government created the job of national counterterrorism prosecutor, in order to better co-ordinate investigations related to attacks.
Mr Darmanin said it was becoming harder to track down extremists as attacks were no longer being carried out by people who previously fought in Syria or Iraq.
The bill would give authorities greater power to limit the movements of people convicted of terrorism for up to two years after their release from prison.
The presentation of the bill came as Mr Castex condemned the intervention by retired right-wing generals in the Valeurs actuelles magazine.
The open letter said that failure to act against the "suburban hordes" – a reference to residents of the mainly immigrant suburban areas of French cities – and other groups who "scorn our country" would lead to "civil war" and deaths "in the thousands".
"Laxist" government policies would result in chaos in France requiring "the intervention of our comrades on active duty in a perilous mission of protection of our civilisational values," the letter said.
Mr Castex called the move "an initiative against all of our republican principles, of honour and the duty of the army".
He also criticised far-right leader Marine Le Pen, who invited the authors to join her anti-immigration National Rally party, and said she shared their fears about the future.
"It could have been an insignificant affair if there hadn't been totally unacceptable political manoeuvring," Mr Castex said in reference to Ms Le Pen.
The defence minister threatened to sanction any active-duty soldiers who added their name in support of the letter.
More details have emerged about the main instigators of the letter, including their ties to far-right, anti-immigration movements in France.
The first signatory, Jean-Pierre Fabre-Bernadac, once ran security in the 1990s for the forerunner to Ms Le Pen's party, the National Front, the Canard Enchaine newspaper reported.
Others include retired general Antoine Martinez, who founded Volontaires pour la France, a right-wing group committed to defending "traditional French values".
Another signatory, retired general Christian Piquemal, is an honorary member of the group who was arrested in 2016 while taking part in a banned anti-migrant demonstration in the port of Calais.