The European Union is offering simplified visa procedures and increased economic aid to Tunisia and Egypt in exchange for smoother deportations of unwanted African migrants, two senior officials in Brussels said.
The bloc has agreed steps to curb arrivals from Libya, the main embarkation point for migrants seeking to get to Europe from Africa, and is now looking at its neighbours.
While the numbers of migrants setting off from there is tiny in comparison with Libya, Cairo and Tunis have fully functioning governments and are able to police their borders, unlike Tripoli's UN-backed administration.
Officials and diplomats say Cairo has put a high price tag on any new help.
"Egypt has two concerns, socio-economic stability and security. And these are interlinked," said an EU official who visited Cairo in January for talks on migration.
"So we are working on establishing a dialogue that would look at that, to the benefit of both the migrants there but also Egyptians from the most vulnerable groups."
Egypt's foreign minister is expected in Brussels for a foreign ministers' meeting on March 6. Another EU official said that would be a good moment "for Egypt and the EU to agree that they want to intensify this cooperation."
Talks with Tunisia include simplifying visa procedures in exchange for a readmission agreement that would make it easier for the EU to deport Tunisians staying illegally in Europe, or other nationals who arrived from Tunisia.
The bloc already has 17 such deals, including with Turkey and Pakistan.
One of the most contentious elements of the EU's push to stem illegal immigration from Africa is its involvement in migrant camps.
The EU has agreed to provide financing for government-run sites in Libya, where – according to a UN report – people suffer consistent abuse, including arbitrary detention, forced labour, rape and torture.
The second official said these camps were "probably the closest we have to concentration camps in the 21st century" but defended the strategy, saying it was better to try upgrade them than do nothing.
"People say they are atrocious and they shouldn't even exist," the first official said. "But they do and we can only see if we can help."
Some EU governments, including Hungry and Austria, want to go further and develop sites in north Africa to hold and screen people, and then allow only confirmed refugees to Europe.
The feeling in Brussels is that such "external processing" would require extensive operations on the ground at an extremely high legal and security risk. The two officials denied this was the subject of talks with Tunisia or Egypt now.
But the EU is training the Libyan coast guard to have it take migrants intercepted in the sea back to camps in Libya, which non-governmental organisations working on migration, as well as some EU lawmakers, call inhumane.