BADALONA, Spain (AP) — Police in northeastern Spain carried out eviction orders Wednesday to clear an abandoned school building where around 400 migrants were living in a squat north of Barcelona.

Knowing that the eviction in the middle of winter was coming, most of the occupants had left to try to find other shelter before police in riot gear from Catalonia’s regional police entered the school’s premises early in the morning under court orders. Judicial authorities had ruled the building was unsafe.

While the eviction was completed without violence, there were moments of tension when people who were losing their homes had to walk past armored officers.

But officers of Spain’s National Police detained 18 people on suspicions they were residing in the country without authorization, lawyer Marta Llonch told The Associated Press.

The squat was located in Badalona, a working class city that borders Barcelona. Many sub-Saharan migrants, mostly from Senegal and Gambia, had moved into the empty school building since it was left abandoned in 2023.

“Putting 400 people onto the street in winter just before Christmas, you have to have a hard heart to do that,” said Younous Drame, a 50-year-old man from Senegal who was among those forced to leave.

A judicial order

The judicial order obliged the Badalona town hall to provide the evicted people with access to social services, but it did not oblige local authorities to find housing for all the squatters.

Llonch, who represents the squatters, said that many people would surely end up without shelter in the cold.

“Many people are going to sleep on the street tonight,” Llonch told The Associated Press. “Just because you evict these people it doesn’t mean they disappear. If you don’t give them an alternative place to live they will now be on the street, which will be a problem for them and the city.”

Many of the squatters lived from selling scrap metal collected from the streets. Others had residency and work permits but were forced to live there because they couldn’t afford housing during a cost-of-living crunch that is making it difficult even for working Spaniards to buy or rent homes. That housing crisis has led to widespread social angst and public protests.

On leaving the school, people loaded their belongings onto carts, some used as trailers led by bicycles, to haul them away.

The Badalona town hall will offer temporary housing to some 30 people, according to El País newspaper. Another 60 people are being attended to by Catalonia’s regional social services, which could end up offering them temporary housing as well, regional officials told the AP.

Migration at the center of politics

The conservative mayor of Badalona, Xavier García Albiol, asked the court to evict the people from the old public school.

His Badalona town hall had argued that the squat was a public safety hazard. In 2020, an old factory occupied by around a hundred migrants in Badalona caught fire and four people were killed in the blaze.

After the eviction was complete, García Albiol visited the school site and declared that “what is unacceptable in this country is that Spain’s government lets absolutely everyone in.”

Like other southern European countries, Spain has for more than a decade seen a steady influx of migrants who risked their lives crossing the Mediterranean or Atlantic in small boats.

While many developed countries have taken a hard-line position against migration, Spain’s left-wing government has said that legal migration has helped its economy grow.

___ Wilson reported from Barcelona, Spain.