ARCHIDONA, Spain — When the Spanish authorities intercepted about 500 Algerian migrants who had traveled by boat to the southeastern coast of Spain, a space shortage in the country’s migrant detention centers left few options for where to send the new arrivals.
So the government sent them to an empty facility near this whitewashed town in the mountainous heartland of southern Spain, about 35 miles north of Málaga: its brand-new prison.
Archidona’s penitentiary stands a few miles outside the town, amid olive groves that were covered in snow last weekend. Designed to hold about 2,000 prisoners, with a staff of almost 600, it was due to open in the first quarter of this year.
The arrival of the migrants, in November, has provoked mixed feelings.
Many of the town’s 8,400 residents helped collect food and clothing for them. Then the migrants held protests in the prison — smashing windows and furniture, and prompting the stationing of riot police officers in Archidona, according to the authorities. Some residents voiced concerns about possible damage to the new prison even before its official opening.
“This unwanted situation has triggered a strong movement of solidarity, but also some worries,” said Rubén Quirante, a schoolteacher and spokesman for an association set up to support Archidona’s detained migrants.
Labor unions representing prison guards complained that the penitentiary needed qualified guards rather than makeshift police surveillance, and nongovernmental organizations filed lawsuits on the grounds that holding migrants in a penitentiary built for criminals violated Spain’s laws.
The government said it was a temporary and exceptional measure, pending the migrants’ return to Algeria within the 60-day deportation period allowed by Spanish law.
Activists have been holding protests outside the prison since its unexpected pre-opening. They have also painted signs along the road to the prison denouncing the mistreatment of migrants and have tried to block police buses leaving to drive the Algerians back to the coast, from where they are made to board ships bound for Algeria.
The town’s mayor, Mercedes Montero, said that most of its residents had welcomed a new prison that would benefit the town financially. But she deplored the decision to house migrants there before it was fitted with a medical center, a cafeteria and access to drinking water.
“This penitentiary never seemed like the ideal place to keep migrants, but of course nobody asked for my opinion,” Ms. Montero said. “Our town is now in the news, but I would have liked it be for other reasons.”
The police would not confirm how many Algerians were still being held, but nongovernmental organizations that have been monitoring the prison estimated that just over 100 remained there at the start of this week.
One of the Algerians suffered a grimmer fate. Mohamed Bouderbala, 36, was found dead in his prison cell on Dec. 29, strangled with a bedsheet. The police said an autopsy had confirmed a suicide, but some activists, opposition politicians and his relatives are demanding a full investigation.
“It’s inhuman to hold a migrant in a prison as if he was a criminal, and it’s of course even more shameful not to manage to protect his life,” said Luis Escobar, a social worker who was among a dozen protesters outside the prison last Saturday.
When Maribel Mora, a senator from the far-left Podemos party, visited the prison on Dec. 1 as part of a delegation of lawmakers, she said she found only one interpreter helping the hundreds of migrants, who were also without psychological assistance and kept in a prison with the riot police, “which is not the way to welcome foreigners who have arrived without using any kind of violence.”
Ms. Mora also denounced the fact that some underage Algerians were placed in the prison, even though minors are supposed to be housed in separate facilities.
Juan Ignacio Zoido, Spain’s interior minister, who in late November told the Senate that the government could keep migrants in a penitentiary in “an emergency situation,” favorably compared Spain’s migration policies with those of other European countries, including some that detain illegal migrants for 180 days.
He also argued that a brand-new prison provided “conditions that are a lot better” than some older Spanish migration centers. Far from mistreating migrants, Mr. Zoido said Spain had saved 15,000 migrants from drowning off its shores in recent months.
More than 3,100 migrants died while crossing the Mediterranean last year, according to a report released this month by the International Organization for Migration, a United Nations agency. The number of drownings was a steep drop from the previous year, after a deal between the European Union and Turkey shut a main route along the eastern Mediterranean into Greece.
The number of migrants reaching Spain almost tripled to nearly 22,000 last year, and reported drownings off the Spanish coast nearly doubled.
Experts attribute part of that Spanish upturn to heavier sea patrolling between Libya and Italy, the main recipient of migrants crossing the Mediterranean, as the criminal gangs that bring migrants to Europe quickly switch their routes.
“Archidona shows not only that the Spanish government isn’t respecting its own norms for migrants, but that it’s also not making any kind of planning for them,” said José Miguel Morales, the secretary general of Andalucía Acoge, an association that assists migrants. “Once Turkey and Libya made things more difficult for migrants, it was clear Spain needed to prepare more infrastructure for them.”
Spain has mostly collaborated with Morocco, rather than Algeria, to stop migrants from entering its territory illegally, either by sea or by climbing the fences that surround Spain’s two North African enclaves, Ceuta and Melilla. Last weekend, over 200 African migrants forced their way into Melilla.
Even before the Archidona case, Spain’s handling of migrants was criticized last summer by Human Rights Watch, which wrote in a study that they were often “detained in substandard, unsuitable facilities.”
Mr. Quirante said most of the detained Algerians wanted to settle in France, where they had relatives. He said each had paid middlemen 6,000 to 12,000 euros, or about $7,150 to $14,300, for their boat crossing to Spain. “To deport them back to Algeria is also a financial disaster for them and their families,” he said.