As many as 6,000 migrants from Morocco, including around 1,500 minors, swam into the Spanish city of Ceuta on Monday (May 17) and Tuesday (May 18), according to the country's interior ministry.
Footage from local Faro TV channel showed soldiers in armored vehicles rushing to the beach as hundreds of potential migrants stood on the Moroccan side of the fence.
Reuters journalists saw Red Cross workers helping migrants laying on the floor.
At least one person died in the crossing, a local government spokesman said.
The adult arrivals were transferred to a local soccer stadium to be deported back to Morocco.
Spain’s Interior Minister said at least 2,700 have already been sent back.
Minors were being sent to an industrial building.
In a televised speech, Spain's Prime Minister Pedro Sanchez called it a serious crisis for Spain and Europe.
"My priority as Spain's prime minister at this moment is to guarantee the control of transit through the border with Morocco, provide the cities of Ceuta and Melilla with everything they need to resolve the humanitarian crisis as a result of the arrival of people, and to proceed with the immediate return, I repeat, immediate return, of everyone who has made an irregular entrance to Ceuta and Melilla as stipulated in the agreements Spain and Morocco have signed years ago."
The arrival of the migrants comes at a time of increased tension between Spain and Morocco over the fate of Western Sahara independence leader, Brahim Ghali, the leader of the Polisario Front, who is being treated in a Spanish hospital.
The Polisario Front wants the Western Sahara to be an independent state, rather than part of Morocco.
The United States in December recognized Moroccan sovereignty over the Western Sahara territory.
Some experts say Morocco uses the tactic of allowing migrants into Ceuta as an instrument of pressure on Madrid.
Ceuta has a population of 80,000 and is located on the northern tip of Morocco across from Gibraltar.
It has long been a magnet for African migrants trying to reach Europe in search of a better life.