An increasing number of migrants are crossing into Spain by sea from north Africa, making it the fastest growing entry point into Europe. Some 6,800 migrants arrived by sea between January and May 2017, a 75 percent increase from 2016. In June, the trend was even more pronounced as 1,900 migrants reached the shores of Andalusia, quadrupling the numbers registered in the same month last year.

Migrant arrivals on the Spanish coastline averaged just under 5,000 a year between 2010 and 2016, according to government data. It is on track to top 11,000 this year, government data shows. Although the Libya-Italy sea route remains the most popular overall with 59,000 migrants between January and May, the Spanish route is becoming more popular – and Italy's new plans to curb migrant flow may make Spain even more attractive.

For those who don't want to risk the Mediterranean, there is another way to get from Africa into Spain – on foot. Migrants frequently jump or cut through the fences separating Morocco from Spain's two enclaves in northern Africa, Ceuta and Melilla. Although Ceuta and Melilla are on the African mainland, Spain claims both territories are integral part of their nation and they have been given the status of semi-autonomous regions on Spanish mainland.

A golfer hits a tee shot as African migrants sit atop a border fence during an attempt to cross into Spanish territories between Morocco and Spain's north African enclave of Melilla on 22 October 2014 Jose Palazon/ Reuters

The number of migrants entering Spain via Ceuta and Melilla more than doubled in the first six months of the year from the same period last year to 3,200 people, according to Spain's Interior Ministry. Once within the enclaves, migrants are either returned to their country of origin or moved to the Spanish mainland, which many use as a jumping-off point for the rest of Europe.

Around 70 sub-Saharan African migrants crossed the razor-wire-topped fence separating Morocco from Ceuta on Tuesday 1 August, leaving 14 people hospitalised.

Helena Maleno, founder of Walking Borders, a nongovernmental organisation working on migration issues in northern Africa, said people fleeing poverty or violence elsewhere in Africa and in the Middle East are increasingly going via Morocco because "it is now being perceived – not as safer – but at least as less dangerous than going through Libya." Many African migrants passing through Libya have reported having been beaten up, detained in camps with no food or water and even traded as slaves before being held for ransom, forced labour or sexual exploitation.

The United Nations Refugee Agency (UNHCR) said the spike in migrant numbers is already putting a lot of stress on Spain's insufficient migration structures. The country is unprepared to handle vulnerable groups such as victims of trafficking or unaccompanied minors and refugees who should be channelled through asylum procedures, the UNHCR said.

"What is clear is that, they (Spain's government) have to get ready. They can't be caught unprepared. What started happening elsewhere in Europe in 2015 can't be allowed to happen here," Maria Jesus Vega, spokeswoman for the UNHCR in Spain, said. "It's not yet an emergency, but you have to take into account that there are no structures here to deal with more arrivals."

Asylum seekers and other migrants arriving in Spain by sea are detained for up to 72 hours in dank, dark cells in police facilities for identification and processing. "Dark, cage-like police cells are no place to hold asylum seekers and migrants who reach Spain," said Judith Sunderland, associate Europe and Central Asia director at Human Rights Watch. "Spain is violating migrants' rights, and there is no evidence it serves as a deterrent to others."

The majority of adult men and women are then sent to immigration detention centres for a maximum of 60 days, pending deportation. If they cannot be deported they are released but have no legal right to remain and are under obligation to leave the country.