Spain now has the second-highest number of novel coronavirus cases in Europe.

More than 18,000 people are infected, and more than 800 have died. Over the weekend, the Spanish government put the country on lockdown: No one may leave their house unless it’s for work, to buy food or medical supplies, or for emergencies. Police are patrolling the streets in nearly every town and city, and people face fines of more than $1,000 if they are found away from their homes for any non-essential reason.

Related: How 'war' with coronavirus could lead to lasting government overreach

But for some Spaniards, there’s a sort of escape.

In Spain, rural towns have emptied over the past few decades as young people moved to the cities for jobs and university degrees. But in recent days, this mass exodus has been reversed: Many of those with family or second homes in the countryside have fled big cities to be closer to relatives or to have more space while they’re quarantined.

Armand Castany, 22, is one of them. He lives in Barcelona, where he studies at the Pompeu Fabra University, but classes are suspended indefinitely. His extended family, however, lives in a small town called Moià an hour and a half away from the city.

“During times of emergency like this, people go where their emotional support is,” Castany said. He adds that he’s limiting physical interactions with people as much as possible for fear of bringing the virus from Barcelona, where people live in cramped spaces.

Clerks in masks seve a customer in a cheese store in Moià, Spain. Credit: Lucía Benavides/The World

In Moià’s town center, the roads are nearly empty. The usual crowds strolling the narrow pedestrian streets are cooped up at home. Most people who are out are going to or coming from the grocery store or the pharmacy. Some of them wear masks — and all of them keep their distance. The usual chatter of teenagers walking in groups and people eating in cafés is gone.

Now, any signs of life come mostly from people’s backyards.

But some locals aren’t too happy about the influx of city folks who have come to spend their quarantine in the countryside.

“It’s a little bit selfish, isn’t it, for city people to flee here? We don’t have the kind of health services here they have in Barcelona.” Yolanda Burdó, Moià resident

“It’s a little bit selfish, isn’t it, for city people to flee here?” 51-year-old Yolanda Burdó said. “We don’t have the kind of health services here they have in Barcelona.”

Burdó works at a retirement home where new rules prohibit outside visitors. She says she worries the influx of outsiders will collapse the local health care system.

“The nearest hospital is half an hour away, and even there they lack some equipment,” Burdó said. “The most serious cases are sent over to Barcelona.”

She says she's mostly upset at the families who came to Moià for the simple comfort of having more space. Some houses in Moià are vacation homes owned by those who spend their summer months outside the city.

Still, there are signs of cooperation in Moià. People are coming together to organize support networks. They’re delivering food and supplies to those in vulnerable situations who can’t leave their houses for fear of putting their lives at risk — and offering childcare services to those who still have to work.

“I hope these difficult times will help everybody learn to live in community,” Burdó said. “It should teach us to be less individualistic and to think about what we can do to help those around us.”