CEGLIE MESSAPICA, Italy (CN) — European leaders on Friday announced a plan to set up a system of centers in Europe and North Africa where people seeking asylum in Europe can be screened and have their cases heard.

The EU’s plan envisions working with North African nations to set up centers on the African continent where asylum seekers can apply for shelter in Europe.

The hope is that refugees and immigrants would go to these centers and not rely on the network of human traffickers who send people across the Mediterranean Sea in flimsy vessels. Thousands of people have drowned in the Mediterranean in recent years.

EU leaders meeting in Brussels pledged also to do more to help impoverished and war-torn African nations as a way to stop people fleeing their homelands. The EU said it would add 500 million euros ($580 million) into a trust fund to aid Africa.

The agreement seems to bend to the wishes of the growing number of EU heads of state, mostly on the right and far right, who have won elections across Europe by denouncing the influx of Africans and Asians into Europe. Europe has been hit by a series of terrorist attacks in recent years, which has heightened fears over the influx of non-European people.

For example, the agreement calls for hardening EU borders and sending people deemed not in need of refuge back to their home countries.

The numbers of people seeking asylum have declined by 95 percent since 2015, when hundreds of thousands of people from the Middle East and Africa entered Europe or sought to, according to the EU officials.

Still, the issue of migration burns hot in Europe.

Before the meeting in Brussels, Angela Merkel, the German chancellor, called it a problem that could undermine the bloc unless EU leaders come up with a plan.

The new accord was a victory for Italy’s new government, which ratcheted up tensions over immigration after taking office in early June.

Italy’s government was voted into office in large part by an electorate angry and concerned about immigration.

Earlier this month, Italy blocked nongovernment humanitarian ships with hundreds of asylum seekers rescued from the Mediterranean Sea from docking in Italy.

That move by the right-wing and anti-immigrant politician and new Italian Interior Minister Matteo Salvini sparked two weeks of turmoil in Europe that culminated with this new deal.

The negotiations in Brussels went through the night and into Friday morning.

EU leaders are in Brussels to discuss a host of issues, including Brexit, global economic tensions in light of new trade barriers imposed by the United States over steel and aluminum, the Eurozone and Greece’s economic bailout.