Morocco was justified in relaxing controls at the border between it and Spain's North African enclave of Ceuta in view of Madrid's decision to admit a sick Western Sahara independence leader to hospital, Reuters reported a minister in Rabat suggesting.
Around 8,000 migrants entered the enclave on Monday and Tuesday by swimming in or climbing over the fence, and Spain deployed troops there to patrol the border.
Local Spanish officials saying Moroccan authorities had been passive and video showing at least one Moroccan border guard ushering migrants through a gate.
El Mustapha Ramid, minister of state for human rights, said late yesterday that Rabat had a right to "lean back" over the hospitalisation of Polisario leader Brahim Ghali.
"What did Spain expect from Morocco, which sees its neighbour hosting the head of a group that took up arms against the kingdom?" he said in a Facebook post.
"Morocco has the right to lean back and stretch its legs… so that Spain knows that underestimating Morocco is costly."
By this morning, the tide of humanity swimming around the border fence had turned into a trickle, and security forces on both sides were intervening to prevent more from crossing.
Spain's decision to hospitalise Ghali, on what Morocco says was a false Algerian passport under an assumed name, has angered Rabat.
Morocco has in recent years coordinated closely with its biggest trading partner Spain to crack down on migrant flows into Ceuta and another Spanish enclave, Melilla, as well as across the Strait of Gibraltar.