The French cabinet has approved a bill aimed at tackling radical Islam after a recent series of attacks by extremists.
The draft law, part of a long-term drive by President Emmanuel Macron to uphold secular values, tightens rules on home-schooling and hate speech.
Some critics, both in France and abroad, have accused his government using it to target religion.
But Prime Minister Jean Castex called it “a law of protection” that would free Muslims from the grip of radicals.
He insisted that the text was not “aimed against religions or against the Muslim religion in particular”.
What is in the law?
The bill “supporting Republican principles” would tighten restrictions on online hate speech and ban the use of the internet to maliciously reveal personal details about other people.
This is seen as a response to the beheading of teacher Samuel Paty in October. Paty, 47, was killed by a lone attacker after showing pupils cartoons of the Prophet Muhammad.
The investigation has revealed an online campaign had been launched against him.
The law also bans “clandestine” schools which promote Islamist ideology and tightens rules on home-schooling.
It would also reinforce the ban on polygamy by refusing residency to polygamous applicants. Doctors could be fined or banned for performing virginity tests on girls.
There are new rules on financial transparency for Muslim associations and a requirement that they sign up to France’s Republican values in return for funding.
A ban on officials wearing religious attire at work is being extended to transport workers and staff at swimming pools and markets.
Why is the law being introduced?
The draft law has been under consideration for some time but recent Islamist attacks pushed it up the agenda.
Paty’s murder was one of three attacks that outraged France. Three people were killed in stabbings in a Nice church in October.
Two people were stabbed and seriously hurt in September in Paris near the former offices of Charlie Hebdo magazine, where Islamist militants carried out a deadly attack in 2015.
President Macron is a staunch defender of French Republican values including state secularism. He has described Islam as a religion “in crisis” and defended the right of Charlie Hebdo to publish cartoons of the Prophet Mohammed.
France has an estimated five million Muslims, Europe’s largest Muslim minority.
What has the reaction been?
Mr Macron has become the target of sharp criticism in several Muslim-majority countries.
Relations with Turkey, already strained, were further undermined with President Recep Tayyip Erdogan describing the legislation as an “open provocation” and saying Mr Macron was “mentally ill”.
Demonstrations have been held in Pakistan, Bangladesh and Lebanon.
The US envoy on religious freedom, Sam Brownback, was also critical, saying: “When you get heavy-handed, the situation can get worse.”
In France itself, some left-wing politicians have expressed concern that the legislation could be seen as stigmatising Muslims.
Le Monde newspaper says it could also antagonise other religious groups who practise home-schooling.
But the BBC’s Lucy Williamson in Paris says pressure has grown on President Macron to act.
Tackling Islamist influence in the name of French secularism may be popular at home, but it’s still a delicate operation for the state, she adds.