Upwards of 800 sub-Saharan African migrants stormed the border fences between Morocco and the Spanish enclave of Ceuta early Thursday morning.

Ceuta’s Guardia Civil reported that more than 400 were successful in setting foot on Spanish soil, thus entering Europe. Ceuta is a small, autonomous Spanish territory on Morocco’s Mediterranean coast, just east of Tangier. Melilla, another Spanish autonomous city farther east on the Moroccan coastline, has along with Ceuta Europe’s only land borders on the African continent. Thus, they offer an appealing and relatively safer alternative to reach Europe than by crossing the Mediterranean Sea in flimsy rubber boats, as hundreds of thousands have done.

During Thursday’s crossing, police reported that some migrants cut holes in the fence and threw stones, “makeshift flamethrowers” and quicklime, a caustic substance that causes burns and irritation. At least 15 police and 132 migrants were injured in the crossing, both by quicklime and the two fierce, 20-foot-high, barbed-wire border fences. Some migrants suffered broken bones. What the Ceuta police described as “unusual violence” provided enough diversion to allow hundreds to make it to Spain.

Videos taken after the surge show men hanging onto or sitting on top of the fences with police below. Eventually, border police helped them get down safely. But in some footage, border police are seen dragging and kicking migrants.

In the forested hills on the Moroccan side of the border, hundreds of migrants camp out in makeshift settlements, sometimes for months, waiting for their chance to reach Europe. Morocco has demolished these camps several times.

Knowing that border police cannot stop every member of a crowd of hundreds, migrants storm the fences en masse. Many have tried scaling the fence multiple times before succeeding in reaching Spanish soil.

Some try other means to enter Ceuta and Melilla, such as hiding in vehicles, suitcases or swimming around the border fence that stretches into the sea. Several have drowned while trying, possibly because Spanish police fired rubber bullets at them. Over 100 migrants entered Ceuta in August 2017 simply by running through a border gate past unprepared guards.

Tens of thousands of migrants have scaled the fences into Ceuta and Melilla in the last decade, but most do not succeed. These crossings are attempted relatively frequently, but not often on this scale. Thursday’s border crossing is the biggest Ceuta has seen since February 2017, when more than 850 people breached the fence in four days.

Several observers have said the unusual absence of Moroccan police during that 2017 surge was deliberate. They surmise that Morocco loosened the border as retribution for Europe’s refusal to recognize Western Sahara in agricultural trade deal.

The Moroccan Ministry of Agriculture substantiated these speculations by effectively threatening “a resumption of the migration flows” through Morocco if Europe didn’t capitulate. A representative of the Spanish Civil Guard, Ramón Carrasco, told Politico that, “Morocco uses immigration as if it were a currency.”

Stepping on Spanish soil does not guarantee safety. In some cases, the entirety of a hundreds-strong group have been caught and returned to Morocco immediately. A few of the migrants who crossed on Thursday received this treatment. Spain recently announced it would review these so-called “devoluciones en caliente,” or “hot returns,” which have been condemned by human rights groups for denying migrants due process and the legal procedures to which they are entitled.

Once migrants have made it over the fence, they run right to the Temporary Immigrant Stay Center (CETI), where they are registered and begin applying for asylum. Sometimes after waiting for months, migrants are then either repatriated to their home countries or released and eventually make it across to mainland Spain and sometimes onwards into other parts of Europe. Spain has automatic repatriation agreements with Morocco, Algeria and several other African countries.  

The Ceuta and Melilla borders are firmly controlled by both Moroccan and Spanish authorities. The collaboration is part of the E.U.’s shifting strategy to stem migration by effectively outsourcing Europe’s border to North Africa and its protection to North African governments. Morocco has had an active, often controversial, role in policing Europe-bound migration. Its Interior Ministry reported that it arrested 50,000 irregular migrants and broke up many migrant trafficking networks in 2017.

Morocco proudly cites its immigration policy as integral in settling migrants within its borders to keep them from reaching Europe. In 2013, it enacted a policy that promised to stop its controversial desert deportations and to regularize over 25,000 migrants, giving them one-year, renewable residence permits. Since then, tens of thousands have submitted applications and at least 12,000 have been granted residency, allowing them to legally work in major cities. Skeptics have called this migration policy an attempt at leveraging investment and political support from the E.U.

However, this process has largely avoided the many Europe-seeking migrants who stay in northern cities and refugee camps. Additionally, the ranks of regularized immigrants include Europeans and Americans, who can enter Morocco freely and often have access to more employment opportunities.

This year marks a decided change in migration flows to Europe. Whereas the maritime crossing from Libya to Italy has seen the most traffic (and the most deaths) for years, Spain is now the top destination for migrants. The U.N. reports that over 22,700 migrants have arrived in Spain this year, tripling last year’s statistic. Nearly 20,000 of these migrants crossed the Strait of Gibraltar in dinghies.

This shift is a result of hardened borders in Italy, intense European pressure on the Libyan coastline and general chaos and brutal conditions in Libya. In addition, Spain’s new socialist government has been relatively more welcoming of immigrants.

Spain is feeling pressure, however. Its agencies responsible for immigration are not entirely equipped to handle the influx. Other European governments are putting the heat on Spain as it begins to bear the bulk of the responsibility for migrants and asylum-seekers to Europe.

After safely reaching Spain on Thursday, the huge crowd of new immigrants joyfully celebrated the completion of what, for many, was a harrowing, months- or years-long journey from their home countries to Europe.