Morocco and the European Union Wednesday signed a fishing agreement worth 40 million euros in annual EU aid, after the previous accord was suspended amid disagreements over the Western Sahara.

The accord, which was signed in Rabat after six rounds of negotiations, will allow 126 fishing boats from 11 EU countries to access Moroccan waters, the vast majority of them Spanish.

The hiatus clouded relations between the North African country and its number one trading partner.

Speaking at Wednesday’s signing ceremony, EU Fisheries Commissioner Maria Damanaki said the new four-year accord respected international law, while promoting sustainability and enhancing development in the Western Sahara.

“The benefits of this agreement will have an impact on the development of the Sahara region and the local population,” Damanaki said, adding that it would also “ensure the sustainability of the sector at the local level”.

The accord covers a 2,500-kilometre (1,500-mile) stretch of Atlantic coastline, from Tangiers in the north to Lagouira on the border with Mauritania, Morocco’s Agriculture and Fisheries Minister Aziz Akhannouch said.

After the termination of the previous agreement, Morocco ordered all European fishing boats to leave its waters, sparking protests by hundreds of fishermen in southern Spain.

Of the 40 million euros in financial aid that Morocco will now receive, the EU will pay 16 million euros in compensation for access to its waters, and another 14 million euros to support the country’s fisheries sector, the EU said.

The European shipowners will pay Morocco 10 million euros.