(Bloomberg) -- Niger’s ruling junta has overturned a controversial anti-migration law, dealing a blow to Europe’s effort to stop African migrants from reaching its shores. 

The law, which criminalized migration through northern Niger, was repealed by a presidential order signed by junta leader General Abdourahamane Tiani.

The nearly €5 billion Emergency Trust Fund for Africa was agreed between African and European leaders in an attempt at a common approach to address the root causes of migration, amid a 2015 surge of arrivals by sea and on land at the EU’s external borders. More than one million asylum seekers and migrants tried to reach EU member states in that year, pushing the union to seek out the partnership with its African counterparts.

Read more: The Desert Town That’s Home to U.S. Drones and People Smugglers

Agadez, a sprawling cluster of low, sand-colored compounds huddling in the desert of northern Niger, became the front line in Europe’s anti-migration efforts. In 2018, illegal crossings on the Niger route plunged by 80% to 23,000, the lowest number since 2012, according to Frontex.

“The local economy of Agadez, which was strongly linked to migration, was deteriorating under the effect of the law,” Mohamed Anacko, the head of the Agadez Regional Council said in an emailed statement.

Before 2015, migration-related activities contributed as much as $100 million per year to the regional economy around Agadez, according to Washington-based think tank International Crisis Group.

The EU earlier this year suspended some of its migration and security-related programs following a July 26 coup spearheaded by Tiani. 

Between 2015-2022 Niger received at least €1.7 billion in migration-related efforts, according to Brussels-based think tank Centre for Africa-Europe Relations.

©2023 Bloomberg L.P.