French President Emmanuel Macron has said he will curb the practice of foreign countries sending imams and teachers to France to crack down on what he calls the risk of "separatism".

Macron has so far stayed away from issues related to France's Muslim community, the biggest in Europe, focusing instead on economic reforms.

More:

But in a much-anticipated intervention less than a month before mayoral elections, Macron on Tuesday said he would gradually put an end to the system in which Algeria, Morocco and Turkey send imams to France to preach in mosques.

"This end to the consular Islam system is extremely important to curb foreign influence and make sure everybody respects the laws of the republic," he told reporters in the eastern city of Mulhouse.

Macron said 300 imams were sent to France every year by these countries, and that those who arrived in 2020 would be the last to arrive in such numbers.

He said his government had asked the body representing Islam in France to find solutions to train imams on French soil instead, ensure they can speak French and do not spread "Islamist" views.

Macron, who is constantly attacked by far-right leader Marine Le Pen on the issue of how to integrate French Muslims, also said he would end the practice of French students being taught by teachers paid by foreign governments.

France has agreements with nine countries, including Algeria, Morocco, Tunisia and Turkey, whereby their governments can send teachers to French schools to teach languages to students originally from these countries.

Macron said he had found an agreement to end the practice with all of these countries except Turkey.

"I won't let any country, whatever it is, feed separatism," Macron said. "You can't have Turkish law on French soil. That can't be."

There are between 5.5 million and 6.2 million Muslims in France, or roughly 8 percent of the total population - making the group the largest Muslim minority in Europe.

After the 2015 attacks in Paris, the deadliest shooting in French history that killed 130 people, scores of mosques have been closed down under anti-terror laws.