Along the Sahara trail that tens of thousands of Africans take each year to reach the shores of Italy, Europe is paying for a pit stop, of sorts — one that it hopes will give these young people on the move a reason to go back home.

The center sits in Niger — in a city bustling with thousands of migrants risking everything to reach Europe — with a tough mission. It gambles that by giving the migrants heart-to-heart talks about the dangers ahead, then teaching them job skills that they can use at home, like how to make bricks out of sand and plastic, it can help stanch the exodus of Africans seeking a better life in Europe.

“Of course, we cannot match their dream of being in Italy,” said Giuseppe Loprete, Niger mission chief for the International Organization for Migration, which runs the center. “But we can give them a local development project.”

That gamble was at the heart of a summit meeting that began Wednesday in Valletta, the Maltese capital, with European and African leaders trying to forge a consensus on an urgent issue that confronts them both, though in sharply different ways: What to do about the tens of thousands of young Africans who try to cross a treacherous desert and sea in the hope of brighter prospects in Europe.