The European Union should set up a "giant refugee city" on the Libyan coast to process African asylum seekers before they reach Europe, Hungarian Prime Minister Viktor Orban has said.
Mr Orban, who has taken a hardline stance against migration, suggested a new Libyan government run the camp.
He made the remarks at a Vienna summit of European and Balkan leaders.
Libya has descended into chaos since a 2011 uprising, with rival governments and militias vying for power.
Mr Orban, who has closed Hungary’s own southern borders with razor-wire fences and guard dogs, said the EU should retake "total control" of its external borders.
Hollande sets out plan to close Jungle
He called for a Western arms embargo against Libya to be cancelled and for Western support to be provided to the Libyan Liberation Army, a rebel group formerly known as the Free Libyan Army.
Merkel seeks deals
German Chancellor Angela Merkel, who has faced criticism from the Hungarian prime minister over her so-called "open-door" policy towards refugees and migrants, said the solution was to secure deals with African countries to send back migrants who do not qualify for asylum.
She said it was "necessary to get agreements with third countries, especially in Africa but also Pakistan and Afghanistan... so that it becomes clear that those with no right to stay in Europe can go back to their home countries".
She also called for the EU to do more to stop illegal immigration while living up to its humanitarian responsibilities.
Mrs Merkel has faced criticism from some quarters within Germany over her approach to the crisis. Her Christian Democrats lost ground to populist, anti-immigration rivals in recent state elections.
More than 300,000 migrants have crossed the Mediterranean this year, with 3,500 deaths recorded so far.