PARIS - France’s lower house of parliament overwhelmingly approved a new counter-terrorism bill on Tuesday, making permanent several controversial measures in place under a nearly two-year-old state of emergency.

The law was approved by 415 votes to 127, with 19 abstentions.

It has encountered little resistance from a public traumatised by a string of militant attacks, despite criticism that it will undermine civil liberties. The vote comes just two days after more bloodshed, with a suspected radical stabbing two 20-year-old women to death in the Mediterranean port city of Marseille.

In Paris, anti-terrorism police are also investigating the discovery of a homemade bomb and a cellphone detonator in the hallway of a building in the wealthy 16th Arrondissement on Saturday. Petrol had been sprinkled around the canisters, sources close to the inquiry said.

Five people in their early 30s were arrested over the incident, including one who is on France’s terror watch list.

The stabbings in Marseille brought to 241 the number of people killed in attacks claimed by or attributed to militants in France since January 2015 - many of which have been claimed by the Islamic State group.

The group, which is fast losing territory across the remaining parts of its self-proclaimed caliphate in Iraq and Syria, was quick to claim responsibility for the Marseille assault, which was carried out by a 29-year-old Tunisian.

Interior Minister Gerard Collomb has defended the anti-terror bill as a “lasting response to a lasting threat”, but it has come under fire from the French left and human rights groups.

As the parliament session kicked off Tuesday, Collomb noted that the state of emergency did not prevent the Marseille attack. “That means we need to be incessantly vigilant, seeing to it that our intelligence services can intervene well in advance every time,” he said.

The new law gives authorities the power to confine suspected militant sympathisers to their neighbourhood without the prior approval of a judge, and to throw a wide security cordon around places or events deemed vulnerable to attack.

It also allows the authorities to shut down a mosque or other place of worship if preachers are found to have incited attacks, glorified terrorism or circulated radical “ideas and theories”.

Lawyer Emmanuel Daoud, a member of the Paris-based International Federation for Human Rights (FIDH), told AFP the law was “an unprecedented degradation of public freedoms and individual liberties”.

On Monday, anti-discrimination group SOS Racisme demonstrated outside parliament against provisions that will allow police to carry out more spot ID checks.

“People who are supposedly foreigners, black or north African will be stigmatised,” Thierry Paul Valette, head of another anti-racism group Egalite Nationale, told French daily Liberation.

The law, designed to replace the state of emergency that France has been under since the wave of bombings and shootings at Paris nightspots and France’s national stadium in November 2015, is expected to come into force on November 1.

The Senate, France’s upper house of parliament, approved it in July after some amendments.

The state of emergency was meant to be temporary but was extended six times in order to protect major sporting and cultural events, as well as this year’s presidential and parliamentary elections.

The government says that 12 planned attacks have been foiled so far this year.

The multiple extensions of the state of emergency met with little public opposition, with surveys suggesting that most people back the changes even at the cost of certain civil liberties.

Critics of the new law have been limited largely to leftist politicians and human rights groups, though UN experts also raised objections in a letter to the French government last week.