Italy's pugnacious new government took its fight to block migrants to Libya on Monday as a new boat with hundreds on board remained stranded at sea, deepening a crisis shaking Europe.

With European leaders at each other's throats over the large number of migrants arriving from North Africa, Italy's far-right Interior Minister Matteo Salvini paid a surprise visit to Tripoli.

There, Salvini called for the establishment of processing centres in various unnamed African countries to deal with potential migrants in a move "to help Libya as well as Italy block migration".

Libya is a key departure point for thousands of migrants hoping to reach Europe, although hundreds drown each year attempting the crossing.

Salvini's unexpected trip came a day after emergency talks between 16 European Union leaders in a bid to break a longstanding deadlock over who should take in the migrants, the bulk of which have been landing in Italy and Greece.

The crisis came to a head earlier this month when Italy's new populist government turned away a rescue boat carrying 630 people, which was also rejected by Malta, forcing the vessel to remain at sea until Spain offered them safe haven.

But the relief was short-lived, with Italy and Malta refused a second vessel carrying 234 migrants who were rescued on Thursday. The move left Germany-operated rescue boat Lifeline stranded in international waters near Malta.

"Let's see if Europe remembers that it actually exists because there is still a boat loaded with migrants in Maltese waters waiting for a port to welcome it and we can tell you again, it won't be in an Italian port," Salvini said.

Ramping up the rhetoric, he earlier issued a blunt rebuke, warning foreign charities to stop rescuing migrants off Libya, accusing them of "causing trouble" and saying Italian ports "are and will be closed to those who aid human traffickers."

His remarks came as Libya's coastguard said it had rescued nearly a 1,000 people from boats in distress on Sunday, raising to 2,000 the number helped by the Libyans in just five days.

Separately, the Spanish authorities said they had picked up more than 600 migrants off their coast on Monday and taken them to land.

'Major problem' for Libya

Salvini has insisted Italy will not take in "one more" refugee, vowing to close its ports to all foreign-flagged rescue ships and demanding that Europe shoulder the burden, warning the migration crisis could threaten the bloc's future.

"We will jointly support, with Libyan authorities, the setting up of reception and identification centres south of Libya, on the external border of Libya, to help Libya as well as Italy block migration," Salvini told a news conference in Tripoli.

With him was Ahmed Maiteeq, deputy head of Libya's Government of National Accord (GNA), who said Libya would invite Mediterranean nations for a migration summit in September.

Earlier, Maiteeq told Italy's La Repubblica daily that the arrival of migrants was also "a major problem" for Libya, saying "all of Europe must think of structural measures to take in African countries to stop migrants."

The crisis has seen France and Italy go head-to-head, with French President Emmanuel Macron accusing Rome of "irresponsibility" for turning away the boats, denouncing the "leprosy" of rising populism.

Italy has in turn accused France of hypocrisy, noting that Paris keeps pushing migrants back across their shared border.

In Germany, Chancellor Angela Merkel is facing an ultimatum from her hardline interior minister who has given her until the end of June to find a European deal to curb new arrivals.

Sunday's emergency EU leaders meeting had aimed to clear the air between member states ahead of a scheduled full summit on Thursday and Friday.

Project Europe 'in danger'

Both Macron and Merkel have vowed to forge ahead with like-minded leaders on ways to reduce migrant flows and share responsibility for those who land on Europe's shores.

The EU's top migration official Dimitris Avramopoulos said European nations would only solve the crisis by working together.

"We must find a way to adopt a shared policy and a shared strategy to face this situation, otherwise the European project is in danger," he told AFP on a visit to Tehran.

"It's a moment of great responsibility," he told AFP.

With fears of new migrant surges in the future, diplomats have warned that the asylum reform impasse could destroy the EU's signature achievement of borderless travel within the bloc.