France will vet asylum-seekers in Libya before they embark on the perilous Mediterranean crossing to Europe, President Emmanuel Macron said on Thursday, but his own officials dismissed the plan as impractical.

Mr Macron said France would open centres in Libya before the end of the summer to process asylum applications. "The idea is to create hotspots to avoid people taking crazy risks when they’re not all eligible for asylum. We'll go to them," Mr Macron said during a visit to a refugee shelter in Orléans, central France.

He said the centres would help to stem the massive influx of migrants into Italy and elsewhere in Europe. However, the president’s own officials immediately cast doubt on whether the plan could be implemented at present, pointing out that security was not yet good enough in Libya.

Mr Macron’s announcement came two days after he brokered talks in Paris between the leaders of Libya’s two main factions, who agreed to a conditional ceasefire and elections.