European leaders called for tougher action on migration on Friday after tens of thousands of migrants crossed into Spain's North African territory of Ceuta from Morocco this week, often by swimming around border barriers.

At least 34 people died trying to reach the Spanish exclave, many by drowning, according to Ceuta President Juan Jesús Vivas, as the mass arrivals triggered a political row over the security of the European Union's external border and drew criticism of the government in Madrid.

Vivas said around 60,000 migrants had breached the territory's border in recent days, according to Spanish media.

Spanish left-wing Prime Minister Pedro Sánchez described the surge as an "attack" and a "violation of Spain's territorial integrity" during a visit to Ceuta on Friday, where he pledged the country's full support to the territory's nearly 85,000 residents.

"The whole of Spain stands by your side. We take responsibility for this situation," Sánchez, who has in the past defended a more welcoming migration policy, said.

He announced further measures to strengthen security along the border with Morocco, including the installation of floating buoys to prevent migrants from swimming to Ceuta. Sánchez also promised fast-tracked procedures to facilitate the return of migrants who entered Spain irregularly.

"Many migrants are already leaving," he said, adding that Spain was cooperating with Morocco.

The chaos prompted Spain to deploy the military to help secure Ceuta's border with Morocco for the first time since May 2021, when more than 8,000 people crossed into the territory within 36 hours.

The EU's border agency Frontex said it had not received a request for assistance from Madrid but stood ready to support Spain if asked.

Most migrants arrived on Wednesday and Thursday by swimming around border barriers, while others climbed the border fence. Among the arrivals were many women, children and unaccompanied minors.

Thousands of migrants spent Thursday night sleeping on the streets after the temporary migrant reception centre exceeded its capacity of 512 people, according to Spanish state broadcaster RTVE.

Pedro Mariscal, who heads Ceuta's food bank, told the media that his organization was unable to provide food for all the new arrivals.

Residents demonstrated on Thursday evening, accusing Madrid of losing control of the situation. Some shops remained closed over fears of looting, while residents said many people were afraid to leave their homes.

Although more people crossed into the territory overnight and on Friday morning, the pace of arrivals slowed sharply from the previous day. Thousands of migrants also returned voluntarily to Morocco, with RTVE reporting that around 25,000 had crossed back by early afternoon.

The migrant crisis drew strong reactions across Europe, particularly from politicians on the right.

European Commission President Ursula von der Leyen called for swift deportations under EU law, describing the images from Ceuta as "unacceptable."

"We cannot allow anyone to come to our Union without abiding by our rules," she wrote on X, adding that EU commissioners were in contact with the Spanish and Moroccan authorities.

Italian Prime Minister Giorgia Meloni suggested Spain could face suspension from Europe's Schengen free-travel area if it fails to regain control of the situation.

"The images coming from Ceuta are shocking and demonstrate, once again, that uncontrolled illegal immigration poses a concrete threat to the security of Europe's borders," she wrote.

She said her right-wing government was convening the relevant authorities and was prepared to take "extraordinary measures" to protect borders and public security, including "the suspension of the Schengen area with Spain."

German Chancellor Friedrich Merz urged Spain to quickly regain control of the situation.

"The protection of the European Union's external borders is crucial for combating illegal migration," the conservative chancellor said.

Swedish Prime Minister Ulf Kristersson said on X that Spain must "swiftly" regain control of the situation and meet its obligations under the Schengen system. The conservative politician said Sweden stood ready to take "measures required to safeguard order and control."

Finnish Interior Minister Mari Rantanen also criticized Madrid, saying Spain had failed to protect the Schengen area's external border. EU member states should support Meloni's proposal, she wrote on X, adding that countries unable to secure their borders should not remain members of the Schengen area.

France said it was tightening controls along its border with mainland Spain. Interior Minister Laurent Nuñez said he had ordered reinforced border checks and was deploying a rapid-response border security unit.

Ceuta is surrounded by the Mediterranean Sea and Morocco. Together with nearby Melilla, it is one of Spain's two territories in North Africa. Although Morocco gained independence from France and Spain in 1956, it continues to claim sovereignty over both territories.

Thousands of migrants, mainly from sub-Saharan Africa and Morocco, regularly gather near the Spanish exclaves hoping to enter the European Union in search of work and better economic opportunities.

Analysts have pointed to poverty and limited prospects for young Moroccans as factors behind this week's surge. Spanish media have also linked it to a recent Supreme Court ruling requiring individual assessments for migrants who reach Spain by sea rather than by breaching border barriers, potentially making immediate returns more difficult.

Some Spanish media and analysts have also questioned whether Moroccan authorities may have deliberately allowed migrants to leave for Ceuta, echoing accusations made during the 2021 Ceuta crisis that Rabat used migration as political leverage in disputes with Madrid.

Morocco has not officially commented on the latest surge.