President Spanish Primer Minister Mariano Rajoy, center, and Catalan regional government Artur Mas, left, pose for the media with foreign ministers before the informal ministerial meeting in Barcelona, Spain, Monday April 13, 2015. Foreign ministers from European and North African countries have gathered in Barcelona to discuss ways to fight terrorism and illegal immigration. Europe has been hit by increasing waves of migration from Syrians and sub-Saharan Africans crossing the Mediterranean in flimsy boats in a bid to get to Europe. (AP Photo/Manu Fernandez)
(The Associated Press)

Spanish Prime Minister Mariano Rajoy, right, shakes hands with President of Catalan regional government Artur Mas before the informal ministerial meeting in Barcelona, Spain, Monday April 13, 2015. Foreign ministers from European and North African countries have gathered in Barcelona to discuss ways to fight terrorism and illegal immigration. Europe has been hit by increasing waves of migration from Syrians and sub-Saharan Africans crossing the Mediterranean in flimsy boats in a bid to get to Europe. (AP Photo/Manu Fernandez)
(The Associated Press)

Spanish Prime Minister, Mariano Rajoy, right, and Catalan regional government Artur Mas, gesture before the informal Ministerial meeting gathering foreign ministers from the European Union and the southern Mediterranean nations in Barcelona, Spain, Monday, April 13, 2015. Foreign ministers from European and North African countries have gathered in Barcelona to discuss ways to fight terrorism and illegal immigration. Europe has been hit by increasing waves of migration from Syrians and sub-Saharan Africans crossing the Mediterranean in flimsy boats in a bid to get to Europe. (AP Photo/Manu Fernandez)
(The Associated Press)

BARCELONA, Spain – Foreign ministers from European and North African countries have gathered in Barcelona to discuss ways to fight terrorism and illegal immigration.

Spanish Prime Minister Mariano Rajoy opened the forum by saying that he believes "the Mediterranean unites us and does not separate us" and that jihadi terror is the biggest threat facing the continent.

Rajoy spoke Monday, three days after a Spanish judge jailed seven people arrested in a case involving alleged discussions about targeting a Jewish bookstore in Barcelona.

Europe has been hit by increasing waves of migration as Syrians and sub-Saharan Africans cross the Mediterranean in flimsy boats in a bid to get to Europe.

Migrants often enter Spain by scaling towering fences in the country's North African enclave of Melilla, surrounded by Morocco and the Mediterranean.