Morocco and Spain have enjoyed a mostly friendly if occasionally acrimonious relationship. After Spain withdrew entirely in 1976, it fought alongside Morocco in defending the latter’s sovereignty over the Western Sahara against the Polisario front and its backer, Algeria. Spain is Morocco’s second-largest trading partner, though some believe Spain has surpassed France, Morocco’s historical economic patron. Morocco’s proximity to Spain has been a boon for its tourism industry receiving tens of thousands of Spanish tourists annually. In 2010, however, the mistreatment of legal Moroccan immigrants traveling through — what Morocco calls the occupied territories — of Ceuta and Melilla by Spanish police, sparked a food blockade by Moroccan activists. Spain perceived this as undermining its clout in the region (which it did).
It is customary during Morocco’s annual Eid al-Aarsh (Feast of the Throne), which celebrates the king’s ascension to the throne, for the monarch to pardon prisoners of his choice. This year, at the request of the Spain's King Juan Carlos I, Morocco’s King Mohammed VI pardoned 48 Spaniards imprisoned over the years, mostly for the sale and smuggling of hashish. One of the pardoned, however, was Daniel Galván Viña, a pedophile accused of raping and filming 11 children, some as young as 4 years old. "DanielGate" — as the pardon is now known in Moroccan media — has again raised doubts about Moroccan-Spanish diplomacy in addition to those about the king’s intentions for his people.