Madrid will try to address the crisis between Morocco and Algeria at the Union for the Mediterranean summit scheduled later this month in Barcelona, Spanish Foreign Minister José Manuel Albares said on Sunday.
In an interview with Diario de Sevilla newspaper, the official noted that Morocco and Algeria are essential partner countries for Spain and the European Union.
"Spain will always work for good-neighbourliness, and for cooperation to build the Mediterranean. Dialogue is essential in this regard," he added.
This is the first time a European official announces plans to address the diplomatic crisis between Morocco and Algeria.
Last week, Paris hosted a conference on Libya, attended by Algerian Foreign Minister Ramtane Lamamra and his Moroccan counterpart Nasser Bourita where the two refused to shake hands.
A number of Arab countries tried to mediate between the two but all attempts have failed.
Ties between the countries have been fractious for years, but have deteriorated since last year after the Algeria-backed Polisario Front said it was resuming its armed struggle for the independence of Western Sahara, a territory Morocco sees as its own.
In August Algeria announced that it had decided to cut ties with Morocco over what it said were Rabat's "hostile tendencies" towards it.