French President Emmanuel Macron has formally signed a sweeping counterterrorism law that replaces a two-year-old state of emergency and is meant to give police more tools to fight violent extremism.

The bill was definitively adopted by parliament earlier this month.

Macron said Monday that it will take effect Tuesday, just in time to replace the state of emergency that is set to expire on Nov. 1.

It gives law enforcement greater authority to conduct searches, to close religious facilities and to restrict the movements of people suspected of extremist ties.

The state of emergency was first imposed in November 2015 after the Paris terror attacks that killed 130 people. It has been extended six times since then.