What does Spain stand to lose in Morocco with Operation Ghali?

What is already known in journalistic jargon as "Operation Brahim Ghali" is going to have consequences, and not necessarily the ones that the protagonists of the operation were calculating. Seen in general terms, all the actors in the drama are losing out; Morocco perhaps not so much, but also.
The origin of the operation lies in Algeria, which hosts the Tindouf refugee camps where the Polisario Front has its headquarters. By sending the secretary general of the independence movement to be hospitalised in Spain, Algiers has demonstrated several things: first, that it does not have the health infrastructure to treat the cancer from which Ghali is reportedly suffering, complicated by the coronavirus. Second, that instead of deciding what is best for the sick man by sending him to Moscow, Geneva or Havana, the Polisario's hosts have used him to disrupt Spain's relations with Morocco. Third, that Algiers is not a mere spectator, but a major player in the conflict. And fourth, the whole imbroglio fuels the mistrust of a good number of Polisario cadres and leaders towards Algerian military power.
The Polisario Front is also hurt, because its dependence on Algeria is evident, as is the little positive impact of its declaration to reopen hostilities with Morocco by breaking the ceasefire signed in 1991. What it has presented as "victories on the front" have resulted in considerable losses, such as that of the head of the Sahrawi Gendarmerie, and the paralysis of its political-military leadership with the leader's illness. The Polisario was counting on a great mobilisation of solidarity in Spain, France, Europe, Africa and Latin America, which has not taken place. Loneliness appears to be synonymous with failure.
Pedro Sánchez's government has also come out of Operation Ghali badly. The only hypothetical benefit, which was to show President Sánchez as the "protector of the Sahrawi leaders" and to gain political and electoral advantage, is questionable. Brahim Ghali was the latest in a long list of Polisario leaders to receive health care in Spain. Before him was the late Ahmed Bukhari, representative at the UN; Abdallah Lahbib, head of the Sahrawi security services, and Algiers' preferred candidate to replace Ghali at the head of the movement, and many others. Nevertheless, in recent years, Polisario has been increasingly criticising and denouncing Spain for abandoning its responsibilities, for betraying its commitments to the Sahrawi people, and for falling into the arms of the Moroccan regime.
And as if that were not enough, Morocco is now increasing tension with the Spanish government, which it accuses of protecting Ghali without even informing Rabat of his accepted hospitalisation following a request from Algiers. Political relations between Morocco and Spain, which are currently at a low ebb - the high-level meeting has no date and King Mohammed VI refuses to receive Prime Minister Pedro Sánchez - may even be reduced to a minimum. Important projects in which Spain was called upon to participate, such as the Strait Link with the tunnel, or the third electricity connection cable between the two countries, or the modernisation programme of the Moroccan railway network, or the construction of the mega-port of Dakhla, are going to be frozen, according to what Moroccan diplomatic sources have leaked to ATALAYAR. This also penalises Morocco by depriving it of an important strategic partner. Cooperation on counter-terrorism will suffer to some extent: it will affect the regular exchanges of information between Spain and Morocco on radicalised Islamist networks in the Moroccan community living in Spain, which has around one million members, as well as possible jihadist groups forming in Ceuta and Melilla.
Bilateral institutional relations may be reduced to a minimum. The only link that is spared, according to reliable sources, will be the relationship between the two countries' secret services, the Spanish CNI and the Moroccan DGED. Paz Esteban López and Yassin Mansuri, who head them respectively, will be the bridge between King Mohamed VI and Spain's King Felipe VI, as well as President Pedro Sánchez, to prevent the situation from escalating.