PARIS — The French government, responding to several attacks over the past seven months, presented a new anti-terrorism bill on Wednesday that would allow intense algorithmic surveillance of phone and internet communications and tighten restrictions on convicted terrorists emerging from prison.
Prepared before the latest terrorist attack — the fatal stabbing five days ago of a police employee by a radicalized Tunisian immigrant — the bill assumed greater urgency in a country where feelings of insecurity have spread.
“There have been nine attacks in a row that we could not detect through current means,” Gérald Darmanin, the interior minister, told France Inter radio. “We continue to be blind, doing surveillance on normal phone lines that nobody uses any longer.”
The draft bill, prepared by Mr. Darmanin, came in a political and social climate envenomed by Marine Le Pen, the far-right leader, who applauded a letter published this month by 20 retired generals that described France as being in a state of “disintegration” and warned of a possible coup in thinly veiled terms.
Published in a right-wing magazine, Valeurs Actuelles, the generals’ letter portrayed a country ravaged by violence, swept by hatred and prey to subversive ideologies bent on stirring a racial war. “If nothing is done,” they said, “laxity will spread inexorably across society, provoking in the end an explosion and the intervention of our active-service comrades in the perilous protection of our civilization’s values.”
In such a scenario, they warned, the dead “will be counted in the thousands.”
The letter might have remained a fringe outburst by a group of retired officers — it was later signed by more than 1,000 retired military personnel, according to the magazine — but Ms. Le Pen propelled it to national prominence by appealing to the generals “to join our movement and take part in the battle that is beginning.”
Their analysis of the ills of French society was precisely hers, she said, and it was incumbent on all patriots to “rise up for the recovery and — let’s say it — the salvation of our country.”
Prime Minister Jean Castex condemned the generals’ letter on Wednesday as “contrary to all our Republican principles,” and its use by Ms. Le Pen as “totally unacceptable.”
Ms. Le Pen’s embrace of the retired generals’ incendiary warning also provoked the fury of Defense Minister Florence Parly.
“The words of Ms. Le Pen reflect a grave ignorance of the military that is worrying for someone who wants to become commander in chief,” Ms. Parly said on Twitter, alluding to the far right leader’s candidacy in the presidential election next year.
She continued: “The politicization of the armed forces suggested by Ms. Le Pen would weaken our military and therefore France itself. The armed forces are not there to campaign but to defend France and protect the French.”
The defense minister said the retired officers involved could be disciplined, and checks were being conducted to verify whether any active-service military personnel were involved.
The letter, published on the 60th anniversary of a failed coup by generals opposed to France’s granting independence to Algeria, amounted to a distillation of the extreme right’s conviction that France is being torn apart by the kind of violence that last week killed the police officer, Stéphanie Monfermé. Her assailant’s position of having been in France illegally for a decade before regularizing his status only fueled the right’s ire.
The retired generals alluded to the “suburban hordes” — a derogatory reference to the mainly Muslim immigrants gathered in aging tower-block developments around major French cities — who they said were detaching segments of the nation “to transform them into territories subject to dogmas opposed to our Constitution.”
One such dogma, they made clear, was “Islamism” and another rampant “racialism” — a word used often in France to denounce the importation from the United States of forms of identity politics that see issues through the prism of race.
Ms. Le Pen has been engaged in what French commentators call a “banalization” operation aimed at making her look more mainstream. Her outburst clearly did not help this effort. An attempted pivot in a radio interview, in which she said that all problems should be solved peacefully, betrayed her unease.
Mr. Darmanin’s draft bill would, if approved by Parliament, pave the way for increased use of computer algorithms that allow the automatic processing of data from phones and web addresses to detect potential terror threats. This use, patchy and experimental until now, would be enshrined in law, and intelligence services would be able to keep the data for research purposes for up to two months.
Laurent Nuñez, France’s national intelligence and counterterrorism coordinator, told France Inter that the technique would apply to communications with people living in sensitive areas, such as Syria, where strongholds of jihadist terrorists remain.
“An algorithm tomorrow will not be able to detect the content of this communication,” Mr. Nuñez said, by way of example. But it would be able “to detect that an individual in France has come into contact with an individual in northwestern Syria.”
Intelligence services could then ask for permission to further investigate the case.
Mr. Darmanin, responding to concerns that civil liberties will be gravely infringed, said that several layers of authorization would be required before tapping the conversations of people detected as suspect by the algorithms.
Concern about infractions of civil liberties in the fight against terrorism have been growing for some time. Arthur Messaud, a lawyer for an association that defends personal online rights and freedom, told France Inter the scope of the new measures was unclear. For example, would all instant messaging be monitored?
The draft bill would also allow the government to monitor terrorists who have completed their prison terms by requiring them to live in certain areas, limiting their movements and barring them from going anywhere — like a sports stadium — that presents “a particular terrorism risk.”
Constant Méheut contributed reporting.