A fence separates Africa from Europe. It’s 20 feet tall and encircles the two small Spanish enclaves wedged between Morocco and the Mediterranean Sea. The fence is tripled layered and topped with razor wire.

Soon, the razor wire might come down. The Spanish government is considering replacing it with other measures that “are less bloody and more respectful of the integrity of the people,” the Interior Ministry said in a statement. “The control of migratory flows does not have to be in conflict with a greater respect for human rights.”

The move is part of a broader set of reforms by Spain’s new socialist government, which entered office in June, to ease the path of Middle Eastern and African migrants. Spain has also accepted boats carrying migrants that were rejected at other ports, and also guaranteed that new arrivals receive free government-backed healthcare.

Related: Forty-seven people died crossing the Mediterranean in a wooden boat last month. This is their story.

The changes come as migrants’ pathways across the Mediterranean evolve to make Spain the busiest gateway into Europe.

Nowhere is this evolving relationship felt more acutely than in the Spanish enclaves of Melilla and Ceuta. Elsewhere, the two continents are separated by hundreds of miles of sea, but in these Spanish autonomous cities the barrier is just a few feet of wire and mesh.

The border fence at Melilla separates Spain from Morocco at one of two land borders between Europe and Africa. Credit: Julian Hattem/PRI

Spain moves to the forefront

For years, the front lines of the Mediterranean migrant crisis were in Italy and Greece, where sun-drenched beaches became thick with crowds of survivors from the treacherous journey across the sea.

This year, the migrants went west. As of late August, more than 32,000 migrants entered Spain via land or sea, according to the UN’s International Organization for Migration. Currently, Spain is receiving twice as many migrants as Greece and six times as many as Italy.

Related: The EU is ignoring international laws it helped create as it works to turn Morocco into a ‘final destination’ for all African migrants

“There is no one simple or linear factor that is leading to an increase in arrivals to Spain over Italy,” said Oussama El Baroudi, an IOM spokesman. “It is likely a combination of factors,” including crackdowns on human traffickers and actions by the Libyan Coast Guard.

Related: After turning away rescued migrants, Italy's far-right claim 'victory' when Spain opens port

Most migrants come to Spain via the sea, often in dangerous rickety boats. But in Ceuta and Melilla, some have the option of simply walking across.

“It’s easy here. You show [your] passport,” said Lotfi, 28, a Tunisian man who’s spent nearly five months in Melilla and hopes to travel to France.

There are official border checkpoints where thousands of Moroccans and Spaniards cross each day to shop and work. An asylum office is located on the Spanish side of the Melilla border post.

Ibrahim Abouyoussef, a 40-year-old Palestinian man from Gaza, spent a week traveling through Egypt and the desert of the western Sahara before reaching Melilla. He’d heard Spain would process his asylum request, he said, and is hoping to have his wife and five children follow if his request is granted.

To climb or not to climb?

It can be more difficult for people of other nationalities. Advocates say Moroccan authorities prevent anyone without proper paperwork from getting to the Spanish side of the border, making it impossible to request asylum.

Security officials are particularly strict with dark-skinned people from sub-Saharan Africa, said María Vieyra, a lawyer with Servicio Jesuita a Migrantes, or Jesuit Service for Migrants.

“This [asylum] office in Spain is almost closed to that population,” she said. “The only option they have is to jump across the border or go by boat.”

The border fence at Melilla is erected in three layers to slow down people trying to cross. The outermost fence is built at a 15-degree degree angle and coated in a small wire mesh designed to make climbing difficult. Rolls of barbed wire are strung along the most vulnerable sections.

Related: The freedom to move isn’t a basic human right. It depends on where you’re born.

Climbing it can be difficult and dangerous, but migrants are successful if they’re very fast or come in overpowering numbers. In July, 602 migrants successfully assailed the Ceuta fence in a massive rush just after dawn. A month later, 118 additional migrants repeated the feat.

Others willing to pay high sums to smugglers are snuck into the cities in the false bottoms of cars or crammed dangerously into hollowed-out dashboards.

Mamoud Barry, a migrant from Guinea, sits on a railing outside the temporary detention center in Melilla, Spain, where he has lived for three months since crossing from Morocco. Credit: Julian Hattem/PRI

Mamoud Barry took to the sea rather than climb the fence.

The 24-year-old from Guinea paid roughly 90 dollars to join a dozen other migrants in a rough-hewn boat that made a wide semi-circle to bypass the fence separating Melilla from Morocco. A smuggler dumped them in the water and left them for nearly three hours until they were rescued by Spanish authorities, he said.

He’s spent the last three months at a temporary migrant detention facility just inside the border fence, waiting for paperwork to clear.

He said he never considered going over the fence because it was too dangerous.

Controlling immigration

Opposition politicians say Spain’s new policies encourage unlimited migration without any thought to the repercussions.

“They are making an advertisement where they say that they should come to Spain because we’ll give you everything,” said Jesús Delgado, the Melilla coordinator for a nascent but rising far-right party, VOX. The party has called for more robust border security measures including potentially the creation of a new border security force or deployment of military forces to the border.

Related: How the murder of a young woman turned Italy's elections into a referendum on immigration

Other European leaders have also criticized Madrid’s moves. In August, Italian Interior Minister Matteo Salvini accused Spain of “encouraging out-of-control immigration.”

There are signs that some of the criticism is working, or else that Madrid’s arms aren’t open quite as wide as they seemed at first.

All but two of the 118 migrants who stormed the fence at Ceuta in August were sent back to Morocco. Deputy Prime Minister Carmen Calvo said that migrants who “violently assault a border” were not privy to the same protections as people in a “humanitarian emergency” rescued at sea.

Rights groups criticized the speedy removal and said it may have deprived migrants of their legal rights.

Related: Meet a boy who survived ‘The Crossing’

Advocates have also bemoaned immediate expulsions without due process that they say still sometimes occur for migrants caught jumping the border fence.

And as Europe has struggled to dampen migration from sub-Saharan Africa, it has increasingly outsourced its border security to countries along the migrant pathway. Since 2015, Europe has paid billions of dollars to encourage African countries, including Morocco, to halt migrants before they get to the Mediterranean’s shores.

No matter what happens in Europe, the obstacles to migrants are just being moved further down the line.

Barry, the migrant from Guinea, left home more than eight months ago and traveled through Senegal, Mauritania, Algeria and Morocco to reach Melilla.

“I would never advise a person of this path, because after I’ve saved myself I can see the danger I risked,” he said in French. “Neither a friend nor a family member would I tell to go where I’ve gone.”

Research for this article was made possible with the support of the Heinrich Boell Foundation North America.