The relationship between Morocco and Spain is going through a delicate moment in which Rabat appears to hold the initiative. While King Mohammed VI has cultivated a close relationship with Donald Trump, President Pedro Sanchez has become one of the US president's most visible European critics, a divergence that analysts say is leaving Madrid in a weaker position relative to its southern neighbor.

Morocco normalized relations with Israel in 2020 through the Abraham Accords, in exchange for Washington recognizing its sovereignty over Western Sahara. King Mohammed even announced he would name a motorway after Trump as a show of his "deep appreciation" for the president. Spain, for its part, shifted its position in 2022 to back Morocco's autonomy plan for that same territory, a concession Rabat continues to use as a reference point in its dealings with Madrid.

Migration has become the most visible lever of Morocco's power over Spain. When Rabat loosens border controls, arrivals spike, as happened in late July, when tens of thousands of people crossed into Ceuta in a single day. Trump himself called the situation a "catastrophe" and an "invasion" at the time, blaming what he called "weak" and "very liberal" Spanish immigration laws.

Layered on top of that pressure is the underlying dispute over Ceuta and Melilla, whose Spanish sovereignty Morocco still does not recognize, at times referring to the former as "occupied Ceuta" in some forums. Analysts note that in the current geopolitical landscape, those able to exploit these mutual interdependencies gain a significant advantage, and Morocco, by this account, is playing that card skillfully against a Sanchez who needs to maintain good relations with both Rabat and Algeria, its main gas supplier and Morocco's regional rival.

Despite the pressure, Sanchez has chosen to keep a cordial tone toward Rabat, crediting Morocco for speeding up the return of migrants after the Ceuta crisis rather than assigning blame. His critics, however, read that caution as a sign of weakness rather than balanced diplomacy, at a time when Spain's relationship with the Trump administration remains strained over defense spending and foreign policy disagreements.