In September 2005, hundreds of African migrants stormed the barbed wire fences in the Spanish enclaves of Ceuta and Melilla in Morocco, seeking to make their way into Europe. Five died and many were severely injured.
Today, the flow of migrants trying to climb over what has become a towering fence in Melilla has slowed to a trickle. A decade of fortifications by Spanish authorities aimed at raising and strengthening the fence — plus legal changes to facilitate their return — have led to a dramatic change.
The fence in Melilla offers a glimpse of what other European frontiers could look like in the future.
In recent weeks several European countries have reinstated border checks to control unprecedented numbers of migrants.
Hungary has gone much further, barricading its border with Serbia — the migrants' main land route into the European Union — and saying asylum seekers will be turned back.
"The process that started in Ceuta and Melilla a decade ago is the blueprint for the militarization of borders across Europe especially at those choke points where you have the main migrant routes," says Jan Semmelroggen, expert on migration policy and management at Nottingham Trent University.
"Spain's two North African enclaves are a sign of things to come."
As of the first week of July this year, 4,718 migrants had entered Melilla compared to 5,948 for the whole of last year, according to police data. The vast majority were Syrian refugees who crossed through passport control rather than attempting the perilous climb. Only two percent of those who arrived actually scaled the fence, the data shows.
Not without criticsim
Spain's approach has not been without criticism. Human rights groups and the European Union have raised concerns about unlawful deportations and excessive use of force by Spanish border guards at the fence.
The government and police say they use the least amount of force necessary. Improvements at the border checkpoints have made it somewhat easier for those seeking asylum to get through, officials say.
The number of asylum requests from Syrians in Melilla increased nearly six-fold from last year in just the first eight months of the year, the government says, to 3,600 at end-August compared to 513 for the whole of 2014.
Syrians, who make a grueling trip passing through Algeria and Morocco, usually cross at the border checkpoint using falsified Moroccan passports or, increasingly, showing their Syrian documents to claim asylum.
"I wasn't comfortable with buying a Moroccan passport, so I decided to go with my Syrian passport and I made it," says Abdulrahman Rajab, a 17-year-old student from Aleppo who hopes to study electrical engineering in Germany.
Abdelmalik El Barkani, the Spanish government's
representative in Melilla, says the refugee holding center where people are kept while their papers are processed used to hold up to 1,300 sub-Saharan Africans. This has shrunk to around 70 or 80, with the vast majority of migrants now Syrian, he says.
Throughout 2005, thousands of West African migrants tried to climb over the fence in waves of assaults that ended in deaths and injuries and made this crescent-shaped sliver of land on the Moroccan coast a hot spot for migration into Europe.
Hundreds of migrants gathered in the woods on the Moroccan side waiting for an opportunity to storm the fence, often using make-shift ladders from trees to scale the barrier.
Spain was overwhelmed by the scale of the crowds attempting to enter and scrabbled to strengthen the fence while working on agreements with Morocco and West African countries like Senegal to send back those who made it over.
Reinforcement of the 11.5 kilometer (7 mile) barrier, partly funded by Europe, doubled its height. Spain received a one-off payment of 10 million euros ($11 million) from the European Comission in 2014 to strengthen security at the fence. This year, Morocco built a fourth fence on its side of the border and
dug a deep trench alongside it.
Spain made legal changes too. For example, in October last year a new law was introduced to allow Spain's military police who patrol the border, the Guardia Civil, to reject the entry of migrants at the fence and return them to the Moroccan side.
The Council of Europe, the United Nations and human rights
groups say this new law aims to legalize "push-backs," or the return of migrants to the other side of the fence without taking their names and giving them the opportunity to ask for asylum.
More than 50 opposition members of parliament have filed an appeal against the law change at the Constitutional Court.
The government says all migrants can pass through the frontier checkpoint and be processed at the offices. Refugee groups say while it is relatively easy for Syrians to get through the Moroccan frontier to ask for asylum at the Spanish checkpoint, it is another matter for black Africans.
"It's virtually impossible for a sub-Saharan African to get past the Moroccan checkpoint," says Paloma Favieres of the Spanish Commission for Refugee Aid who regularly makes trips to the enclaves.
For those who do seek asylum, however, Spain has offered new services. For example, Spain has opened offices at the main frontier crossing of Beni Ensar to process around 30 asylum claims per day.
The prefab building includes a waiting area with children's playroom, complete with a jumble of plush toys and foam letters, and cubicles with the services of an interpreter and lawyer.
Once processed, Syrians are taken to the temporary migrant center in Melilla to wait for their refugee status to be granted, a process that can take up to two months, police say.
Mustafa Hamdwli, a 25-year-old wearing a Barcelona Football Club t-shirt, waited earlier this month by the asylum seekers offices after entering Spain with his Syrian passport. He has lived for one year in Algeria and spent five days crossing Morocco to enter Melilla.
A former student of English literature at Aleppo University, he wants to join his brother who works in construction in Germany to finish his studies or start work in order to send money to his parents in Syria whose house was bombed in the war.
"I will stay in Melilla for one month, the Spanish government will send me to Malaga. I'll stay there for two or three days and after that I will go by bus to Germany," he said.