They scale barbed-wire topped fences and cross the sea in inflatable boats or jet skis -- more than 36,000 migrants entered Spain this year seeking a better life in Europe. Almost all of them relied on smugglers to make the crossing.
Ousman Umar, who made a five-year journey from Ghana to Spain, said it was "impossible" to travel thousands of kilometres (miles) from sub-Saharan Africa through deserts and other inhospitable areas without the aid of gangs.
"There is almost no chance of reaching Europe illegally" without paying traffickers, Robert Crepinko, the head of the human smuggling unit at Europol, the European Union's policing arm, told AFP.
Ninety percent of migrants who enter Europe are helped by human traffickers, he added, citing a 2015 study.
Spain has become the main entry point for migrants arriving this year, after Italy and Greece.
"The journey can last one year, two years, depending on the ring and the funds you have, because the trafficking networks will take you as far as you can pay," Jose Nieto Barroso of the national police's human smuggling unit UCRIF told AFP.
Migrants gather in Morocco because "it's the best place to wait for the right moment to cross" over to Spain, said Nieto Barroso.
The vast majority pay for a spot on an inflatable dinghy or to take part in a mass run on the heavily fortified border fences that surround Ceuta and Melilla, two tiny Spanish territories in North Africa that share the EU's only land borders with Africa.
- Up to 5,000 euros -
Human traffickers charge 18 euros ($21) to try to scale the border fences, 200-700 euros to join a packed boat to cross the narrow Strait of Gibraltar separating Spain from Morocco by just 15 kilometres (nine miles) at its narrowest point, or up to 5,000 euros to make the trip by jet ski, according to Spanish police.
Europol estimates migrants pay on average 3,000-5,000 euros for a complete trip to Europe.
Once in Spain, many want to move on to wealthier northern European countries like Britain, France and Germany where they believe they will have better opportunities, or because they already have family there.
Once again, human traffickers play a role in getting them there.
The smugglers promise migrants they will be rescued at sea by the Spanish coast guard and then taken to migrant reception centres where "in three or four days members of the network will be in the area and get you out," Nieto Barroso said.
The gang will then take the migrants to another country or, in worst-case scenarios, pass them on to other gangs that exploit them.
- 'Chaotic' reception -
Women are sometimes forced into prostitution while men are used as slave labour in agriculture or made to beg in the streets.
The rings "supply people. They say: 'I have 8, 12, 15 people from the sub-Sahara who can be put to work'," said Nieto Barroso.
Gangs take advantage of the "brutal collapse" of overcrowded migrant reception centres, and gain access to migrants through nonprofit organisations which work with the newcomers, he added.
Paloma Favieres of the Spanish Committee for Refugee Aid (CEAR) denounced the reception Spain gives migrants as "chaotic".
She said she notifies police whenever she believes a migrant is at risk of falling prey to human traffickers, but stressed it was up to police "to fight against crime".
"I don't get any help from the police," she told AFP.
With migrant arrivals to Spain's southern shores on the rise, more of them are heading north to the border town of Irun, some sleeping rough as they wait to cross into neighbouring France, or to Santander, where police in August arrested two people for hiding migrants in their vehicle which was going to board a ferry bound for Britain.
Police smashed 25 human trafficking rings in Spain last year, but many more remain active in Africa, recruiting more migrants.