France's prime minister said on Friday he would consider a temporary ban on foreign financing of mosques, urging a "new model" for relations with Islam after a spate of militant attacks. Manuel Valls, under fire for perceived security lapses around the attacks, also admitted a "failure" in the fact that one of the jihadists who stormed a church and killed a priest on Tuesday had been released with an electronic tag pending trial. In an interview with French daily Le Monde, Valls said he was "open to the idea that — for a period yet to be determined — there should be no financing from abroad for the construction of mosques." The Socialist prime minister also called for imams to be "trained in France, not elsewhere." He said Interior Minister Bernard Cazeneuve, whose portfolio also includes religious affairs, was working on building a "new model" for France's relations with Islam. France has just over 2,000 mosques, for one of Europe's largest Muslim populations which numbers around five million. Both Valls and Cazeneuve have faced calls to resign after the second militant attack in less than a fortnight raised questions over France's vigilance and preparedness. The government has faced tough questions since it emerged that both church attackers had been on the radar of intelligence services and had tried to go to Syria. Sparking particular ire was the revelation that one of the assailants, 19-year-old Adel Kermiche, had been released from prison while awaiting trial on terror charges after his second attempt to travel to Syria. The electronically tagged Kermiche was allowed out of his home on weekday mornings, enabling him and his accomplice to storm a church in the Normandy town of Saint-Etienne-du-Rouvray and slit the throat of 86-year-old priest Jacques Hamel at the altar. Kermiche's accomplice Abdel Malik Petitjean, also 19, had been on the security watch-list since June after trying to reach Syria from Turkey. On Friday, the French weekly L'Express revealed that Kermiche had described the modus operandi of the attack on the encrypted messaging application Telegram. "You take a knife, you go into a church. Bam!" says a chilling message recorded just a few days before the attack whose authenticity was confirmed by a source close to the investigation, according to L'Express. Other messages speak of the influence of a "sheikh" Kermiche met in prison, his wish to set up a terrorist cell and details of his failed attempts to reach Syria. Some 200 people were in the Telegram group receiving the messages, L'Express said. The church attack came as the government was already facing a firestorm of criticism over alleged security failings after the Bastille Day truck massacre in Nice that left 84 people dead two weeks ago. In the government's first admission of a lapse since the two attacks, Valls acknowledged Kermiche's liberty was a "failure, it has to be recognized," adding that judges needed to take a "different, case-by-case, approach, given the jihadists' very advanced concealment methods." But he said it was "too easy to hold judges responsible for this act of terrorism." Meanwhile a source close to the investigation said a Syrian asylum seeker had been taken in for questioning after being arrested at a refugee center in Alliers, central France. A photocopy of a Syrian passport was found at Kermiche's home that may be that of the asylum seeker, the source said. Two militant attacks this month in Germany's south were carried out by asylum seekers, reviving a backlash against Chancellor Angela Merkel's decision last year to open the borders to those fleeing war and persecution. A 30-year-old member of Petitjean's family and a 16-year-old whose brother traveled with Kermiche are also in custody. In a newly released video, Petitjean pledged to attack France, directly addressing President Francois Hollande and Valls. Wearing a striped T-shirt, Petitjean speaks in French laced with Arabic in the footage released by the Amaq news agency linked to Daesh (the so-called IS). He and Kermiche pledged allegiance to Daesh in a video made before they murdered Hamel that emerged afterwards. Hamel's funeral will be held in the Gothic cathedral of nearby Rouen next Tuesday. On Friday, France will observe a day of fasting and prayer called by the French Catholic Church "for our country and for peace in the world."