Migrants, including children, continued to trickle into Spain’s north African enclave of Ceuta on Wednesday after thousands crossed over from Morocco in the two days before.
The surge of the previous days dwindled as Moroccan border guards enforced the frontier divided by the double-wide, 10-meter (32-feet) fence.
But hundreds are still trying to find their way across the frontier.
Spanish officers fired tear gas into the buffer zone between the countries to dissuade more crossings.
Some people rowed small wooden boats to reach the beach where officers waited. Others swam.
Spain’s Interior Ministry said that it has returned more than half of the migrants.
Those included some teenagers who appeared to be under 18 that witnesses saw Spanish police usher back across the border.
Spanish law stipulates that unaccompanied minors must be taken into care by authorities.
“We have never seen such an arrival of this magnitude,” Red Cross spokeswoman Isa Brasero told the AP.
“The city has the means to take care of all the people that arrive to its shores, but you never imagine that you will face this type of situation.”
At least 5,600 Moroccans adults were returned to Morocco, in line with a decades-old agreement between the two countries to expel all those who swim across the border.
Around 2,000 minors were sent to warehouses run by charity groups.
Unaccompanied children slept on the floor of a warehouse, as well as in tent beds set up by the Red Cross.
While Morocco tightened its frontier controls, some people kept coming, forcing Spanish authorities to increase their criticism of counterparts in Rabat.
Prime Minister Pedro Sánchez told Spain’s Parliament, a day after he visited Ceuta, that this was an act of defiance and disrespect, not for Spain but for the European Union.
Foreign Minister Arancha González Laya also increased her tone on Wednesday, saying for the first time in public that Spain believes Morocco loosened its border control to retaliate for Spain having given medical assistance to the head of the Western Sahara liberation movement, a disputed territory to Morocco’s south.
Over the decades, Spain has built a close relationship with Morocco to crack down on illegal border crossings, but also to increase economic ties and fight extremism.
Morocco’s loosened border watch came after Spain decided to grant entry for medical treatment to the chief of a militant group that fights Morocco for the independence of Western Sahara.
Morocco annexed the sprawling region on the west coast of Africa in 1975.
Morocco’s Foreign Ministry had said Madrid’s move to assist Brahim Ghali, head of the Polisario Front, was “inconsistent with the spirit of partnership and good neighborliness” and vowed there would be “consequences.”
In the first public comments on the situation in Ceuta by a Moroccan official, Mostapha Ramid, minister for human rights, said in a Facebook post Tuesday night that Spain’s move to receive the Polisario leader was “reckless, irresponsible and totally unacceptable.”