Migrant arrivals by sea to Spain tripled in 2017 on the previous year, mainly because of a surge in the numbers of Algerians and Moroccans, while over 200 died trying to make the crossing.
"At the end of the year, the tally is devastating," the Spanish Commission for Refugees (CEAR), which defends the right to asylum, said in a statement.
Almost 21,500 people arrived by sea on Spain's southern shores -- popular with northern European tourists -- between January 1 and December 20, up from 6,046 during the same period last year, according to the International Organization for Migration (IOM).
The number of deaths has also risen. So far this year, 223 people have died or disappeared while trying to reach Spain by boat, 95 more than in 2016.
Most sea arrivals are reported along the Strait of Gibraltar, which is the narrowest passage of the Mediterranean Sea separating Spain from Morocco.
Smugglers transport migrants to Spain on rickety wooden boats, inflatable dinghies, and even jet-skis, charging hundreds of euros for the trip.
In August, footage of sub-Saharan African migrants arriving by dinghy on a packed beach in Cadiz in the southern region of Andalusia went viral on social media, drawing attention to the rise in migrant numbers.
"We are suffering migratory pressure in the entire Mediterranean area," Spain's interior minister, Juan Ignacio Zoido, said in a radio interview this week.
'Focused on repression'
While migrant arrivals rose in Spain, they fell in Italy and Greece, the primary entry point for migrants in Europe.
Nearly 119,000 migrants have arrived so far this year in Italy, which has put in place more aggressive measures to stem arrivals on its shores, including sending Italian military ships to assist the Libyan coast guard with patrols and interception.
Roughly 28,000 migrants arrived in Greece, where a 2015 European Union deal with Turkey has helped to reduce the number of people making the sea crossing from Turkish shores to outlying Greek islands.
Both countries each received over 170,000 migrants by sea in 2016.
Fewer people over all have died in attempted crossings of the Mediterranean.
So far this year 3,116 migrants have died or disappeared while trying to cross the Mediterranean into Europe, down from 4,967 last year, according to the IOM.
The bulk of the migrants who have arrived in Spain in recent years have been from sub-Saharan Africa but this year has seen a rise from people from Morocco and Algeria, organisations that work with migrants said.
The increase in arrivals from Algeria is due to "the economic situation in the country, which has deteriorated in the last three years" following a drop in the price of oil, a key export, Carlos Arce of the Human Rights Association of Andalusia (APDHA) told AFP.
Social unrest in northern Morocco's Rif region is behind the rise in arrivals from that country, he added.
Moroccan security have been "more focused on repression than in controlling the flow of migrants", Arce said.
Surfboards and jet-skis
Migrant arrivals from Morocco to Spain have risen since June, the United Nations Refugee Agency (UNHCR) said in a report last month.
"Moroccans use all sorts of methods to reach Spain such as jet-skis, surfboards, inflatable dinghies and wooden boats which sometimes transport over 60 people," it said.
Spanish authorities have struggled to cope with the surge in migrant arrivals.
The government came under fire from human rights organisations in November after it housed some 500 migrants who arrived in southern Spain, mainly from Algeria, at an unopened prison due to a lack of space at immigration detention centres.
During the last two weeks "hundreds of people have been sent back to Algeria" from the prison, including several minors, according to the director of migrant rights group Malaga Acoge, Alejandro Cortina.
Rights groups have called for migrants to be allowed to wait for the outcome of their asylum bid under more lax conditions, by reporting regularly to police or a court.
But Zoido has argued that there is a risk that the migrants would disappear, causing a "pull effect" that would lead smugglers to bring more migrants to the country.