French Prime Minister Manuel Valls at the Elysee Palace in Paris | Thomas Samson/AFP via Getty Images Manuel Valls ‘open’ to ban on foreign funding of French mosques French prime minister says relationship with Islam needs to be reinvented.

French Prime Minister Manuel Valls is "open" to the idea of imposing a temporary ban on foreign financing of the construction of mosques in his country, he said on Friday.

France needs to "invent a new relationship with Islam" and Imams should be trained locally, "not elsewhere," Valls added in an interview with Le Monde.

Valls labeled a "failure" the fact that one of the two men who killed a priest in a church on Tuesday had been under house arrest with an electronic tag pending trial and was able to take part in the attack. He said the incident showed that judges needed to take a "different, case-by-case, approach."

The prime minister said fighting terrorism was not just the responsibility of the government, but all of society needed to get involved.

Valls' remarks follow a spate of terror attacks in France, several of which have been linked to ISIL.