Spain is sending troops to bolster security in its North African enclave of Ceuta after thousands of migrants swam from Morocco into the territory on Thursday.
At least 15 people drowned while trying to reach Ceuta. Local officials had appealed to Madrid for help after a recent rise in attempted crossings, but there were chaotic scenes on Thursday as border controls apparently broke down.
Spain's Supreme Court ruled this month that migrants stopped at sea while trying to reach Ceuta or Melilla, another Spanish enclave, cannot be summarily returned to Morocco.

Spain's interior ministry accused human trafficking networks of exploiting that to "encourage the flow of undocumented migrants".
"The armed forces will reinforce the Civil Guard in the exercise of its powers and any others that may be necessary to maintain security in the city of Ceuta," the ministry said.
Ceuta, on Morocco's northern coast, is separated from mainland Spain by the Strait of Gibraltar and has long been a focal point for migrants attempting to reach Europe.
The breach prompted Italy's government to say it was considering "extraordinary measures" including closing the open border Schengen agreement with Spain.
The number of migrants attempting to reach the Spanish enclave of Ceuta had been rising for several days.
Then on Thursday, thousands of people slid down concrete embankments into the sea in order to swim around the jetty that marks the border.
On the Spanish side, the beaches were soon covered in rubber rings and flippers. While some migrants were celebrating their arrival, more than a dozen drowned trying.
It's not yet clear what prompted this surge in illegal crossings from Morocco, or how hard the authorities there tried to prevent it. At one point, a Spanish official said the border was in total collapse.
Spain's Prime Minister, Pedro Sanchez, is due in the territory on Friday and has pledged to return things to normal immediately.
Migrant reception centres are overwhelmed, and the local authorities have accused Madrid of being too slow to react.
Juan Jesús Vivas, the leader of Ceuta, said the influx was overwhelming resources and urged the Spanish government to intervene.
The breach has also prompted a political spat with Italy, where Prime Minister Giorgia Meloni says she's considering suspending the open border Schengen agreement with Spain.
In a post on X she said the images from Ceuta were "striking", and show that "uncontrolled illegal immigration poses a concrete threat to the security of Europe's borders".
Her comments echoed similar remarks made earlier in the day by Foreign Minister Antonio Tajani.
However, it is a threat that seems impossible to enforce.
Spanish Foreign Minister Jose Luis Albares accused Tajani of weaponising immigration for political ends.
He said such remarks were "improper" for "a partner and friendly country from which we expect European solidarity and not partisan demagoguery".
The Schengen Area is a system of open borders spanning 29 European countries that have officially abolished controls at their common borders.
It was unclear how many exactly had crossed the border. Spanish media estimated between 2,000 and 3,000 people entered Ceuta on Thursday, according to Reuters, but said that the Guardia Civil had not confirmed the figure.
As tensions rose, there were unconfirmed reports of clashes late on Thursday.
In Fnideq, a Moroccan town near the Ceuta border, Moroccan authorities fired water cannons at migrants in an attempt to deter them from crossing, witnesses told Reuters.
In Melilla, Spain's second autonomous city in northern Africa, footage from local media and human rights organisations appeared to show clashes at the Beni Ansar border point.
The surge has prompted comparisons with May 2021,when around 8,000 people entered Ceuta over a matter of days, exacerbating diplomatic tensions with Morocco.
Ceuta and Melilla \represent the European Union's only land border with Africa.
Spanish authorities have increased security around the enclaves in recent years through increased surveillance, barrier reinforcement, and improved bilateral relations with Morocco, but people continue to attempt to cross.