The cosy relationship between Washington and Rabat has long been flaunted by both sides, from Morocco's announcement this year that it would be the first African state to join Donald Trump's Board of Peace to the congratulatory message recently sent by Trump to mark King Mohammed VI's 27 years in power. This was reported by Qazaqyia.kz citing The Guardian.

The latest example landed this week. As Spain grappled with the aftermath of the sudden influx – and swift return – of more than 70,000 people into Ceuta, Morocco's monarch confirmed he had named a $1bn highway flanking the disputed territory of Western Sahara after Trump.

The deepening ties have come under renewed scrutiny as questions continue to swirl over what exactly led to the deadly mass border crossing into the tiny Spanish territory in north Africa.

“I think there's enough evidence to hypothesise or claim that Morocco is behind this,” said Riccardo Fabiani, the north Africa project director for the International Crisis Group. “But there was no clear trigger for this, and this is what is puzzling for everyone.”

Observers have suggested Spain's recent rapprochement with Rabat's archrival, Algeria, could have set off Morocco. But another, perhaps more plausible explanation pointed towards the US, said Fabiani.

“It's obviously impossible to demonstrate,” he said. “But in terms of plausibility, I don't think it's impossible to imagine that Morocco might have done something to earn brownie points with its allies, given that Morocco and this particular administration in Washington do have a very close, excellent relationship.”

While Morocco had likely not “masterminded” the surge into Ceuta, he said, its relationship with the Trump administration – along with the Moroccan king's desire to keep its claim to Ceuta in the spotlight – may have affected how it responded to fast-spreading online rumours about the Spanish border being thrown open.

“For sure the Moroccan security forces were monitoring those conversations,” said Fabiani. “They saw that and there was probably some conversation where they decided to do nothing and see where this goes.”

What followed made headlines across the globe as tens of thousands of people swam or waded across one of the EU's two land borders with Africa. As Spain scrambled to cope, far-right voices seized on the images.

In the US, the vice-president, JD Vance, and the state department blamed the influx on the Socialist-led government of Spain, while Trump warned that electing Democrats would make what happened in Spain “look small-time”. At no point did any of them mention Morocco or the potential role it might have played.

Trump and his administration have long been open about the deep antipathy they feel for Pedro Sánchez, the Spanish prime minister, whose refusal to allow the US to use its airbases during the Iran war, rejection of the 5% defence spending target and vociferous criticism of Israel's actions in Gaza have arguably made Spain the administration's least favourite EU country.

The American response seemed to be a triumph for Rabat, whose relationship with the US president traces back to his first term, when Morocco agreed to normalise ties with Israel in exchange for Trump's recognition of its sovereignty claim over the disputed territory of Western Sahara.

Since then, Morocco's all-powerful monarch had doubled down on outreach efforts, said Fabiani. “The Moroccans have really made extra efforts to cultivate every single major decision-maker within the administration, including the president himself, to make sure that this administration will support, until the end, the Moroccan autonomy plan for Western Sahara.”

A hint that the relationship could help Morocco lay claim to more than Western Sahara came in a recent US congressional report that appeared to be sympathetic to Morocco's refusal to recognise Ceuta as Spanish territory, describing it as “Spanish-administered” rather than a part of Spain, as it has been since 1580.

Days after the influx, interest in Ceuta remained heightened among those close to both Trump and the Israeli government, said Haizam Amirah-Fernández, the director of the Madrid-based Centre for Contemporary Arab Studies. “They haven't stopped talking about Ceuta for several days in a row, which is quite striking.”

What had been laid bare was Rabat's willingness to use “hybrid tactics to achieve political objectives”, said Amirah-Fernández, drawing a parallel with May 2021 when Rabat loosened border controls to allow more than 8,000 people to cross into Ceuta in a show of anger over Madrid's decision to allow a Western Sahara pro-independence leader to travel to Spain to be treated for Covid-19.

This time around, as nearly 10 times more people crossed into Ceuta, it set off a bout of finger-pointing across the EU rather than any kind of concerted effort to push back using the bloc's status as Morocco's largest trading partner and largest foreign investor.