"We are happy to work together because we share the same risks and problems - illegal immigration, drugs, and terrorism." 
 
Police offices

On Wednesday, activists in Morocco who have twice stopped food shipments into Mellila over the alleged police abuse, agreed to suspend their demonstrations until September.

The deal to end the action during the Islamic month of Ramadan brought a temporary end to the on-and-off commercial blockade of Mellila, a city of 70,000 people, which Morocco calls "occupied" territory.

In another incident that has caused tension between the two countries, Morocco alleged earlier this month that Spanish police had abandoned eight sick sub-Saharan migrants off the Moroccan coast after intercepting them trying to enter Spain.

Rubalcaba said on Monday that he had formally agreed to meet at least once a year with his counterpart to assure stable relations between Morocco and Spain.

He said police from both countries would meet quarterly to try and work closer together within Mellila and Ceuta, another disputed enclave. 

Rubalcaba said both countries will establish two police offices in Tanger and Algeciras by next summer where both Spanish and Moroccan police will work side by side.

Moroccan officials said privately on Monday that Rabat was upset about what they said was Spain's expansion of spying activity in the north of the country and a lack of enthusiasm from Madrid towards Morocco's newly-appointed ambassador to Spain.

They also cited the flying of Spanish military helicopters over northern coastal areas during visits there in June and July by Morocco's King Mohammed VI.

Rubalcaba held talks with the king earlier on Monday.