Spain is shifting its foreign policy towards Africa while lobbying the EU and NATO for support to address migration from the continent, aggravated by the Ukraine invasion, two senior government officials and two diplomatic sources have said.

Spain will use a NATO summit in Madrid this week to press its case, and is likely to ask for increased intelligence sharing by the alliance including on issues related to migration, the diplomats said.

Even before Russia's Feb. 24 invasion of Ukraine, Socialist prime minister Pedro Sanchez had revived a strategy mothballed by previous governments of working with African partners to contain migration and to tackle root causes such as instability and climate change, two officials close to him said.