Morocco’s all-powerful monarch and Europe’s most prominent leftwing leader make for uneasy bedfellows in a relationship of mutual dependence. But the migration crisis that erupted at Spain’s borders has signalled where King Mohammed VI holds leverage over prime minister Pedro Sánchez.Although Morocco’s economy is one-tenth the size of Spain’s, the two countries are bound by a dense web of commercial ties. Yet they diverge on big geopolitical issues. King Mohammed has cultivated close ties with Donald Trump, while Sánchez has become one of the US president’s main antagonists in Europe.The desire of many young Moroccans to leave their country, and the presence of two vulnerable Spanish exclaves on the north African coast, make migration a powerful bargaining chip for King Mohammed.This was clear long before last Thursday, when about 60,000 people swam from Morocco into the exclave of Ceuta. But the unprecedented influx – equal to three unauthorised migrants for every four Ceuta residents – marked the culmination of a five-year period in which Madrid has found it harder to manage an increasingly emboldened Rabat.Pol Morillas, director of Cidob, a Barcelona think-tank, said Ceuta was a clear example of the “weaponisation of immigration”, likening it to how Turkey allowed Syrian refugees to try to cross the Greek border and to Belarus attracting Iraqi migrants to push them into Poland.“In today’s geopolitical landscape it’s not always the largest powers that matter most. Those that are able to leverage interdependencies often hold a significant advantage,” Morillas said.Migrants wait for humanitarian assistance on a beach in Ceuta, a Spanish territory in North Africa. Photograph: Finbarr O'Reilly/The New York Times