GÓSOL, Spain — The castle that crowns the hill above the village of Gósol used to be among the grandest along Spain’s border with France, with views of fertile farms and forests rich in timber that stretched up to the cloudy mountaintops.
But the castle is in ruins now, and until last year, Gósol had fallen on hard times, too. The town census had gone down in nearly every count since the 1960s. The school was on the verge of closing for lack of students. The mayor had even taken to television with a plea to his countrymen: Come to Gósol, he asked, or the town would disappear.
It took a pandemic for Spaniards to heed his call.
Among those who packed their bags was Gabriela Calvar, a 37-year-old who once owned a bar in a beach town near Barcelona, but watched it go under during last year’s lockdowns and decamped to the town in the mountains for a new start.
María Otero, a web designer who found she could telecommute, brought her husband and three children to Gósol, the place where her grandparents had been born, but where she had only spent the summers milking cows on visits.
It was the rare silver lining of a troubled time: About 20 or 30 newcomers to a dwindling town of 140 souls, where even the tiny school on the town plaza got a second chance after parents started enrolling their children there.
“If it weren’t for Covid, the school would have closed,” said Josep Tomás Puig, 67, a retired mail carrier in Gósol who spent his life watching the younger generation depart to Spain’s cities. “And if the school closed, the town might as well have closed too.”
Gósol was hardly the first village in the country to be on a the brink of disappearing. For decades in Spain, a landscape of walled cities, stone bridges and ancient winding roads has become mostly abandoned as generations of young people left for cities. La España Vacía, or “the Empty Spain,” is the phrase that was coined to describe the blight.
Elderly pensioners wander empty streets with few shops and no schools. In 2005, a British man bought an entire village in the region of Galicia — one of an estimated 3,000 that are abandoned there — for 45,000 euros, less than $55,000. This year, a local political party that’s made advocating the oft-forgotten province of Teruel its sole aim won seats in Spain’s national legislature. It’s name: Teruel Exists.
Yet tiny Gósol had fared better than many others, residents say.
It sits in the wealthy autonomous region of Catalonia, in a majestic valley in the Pyrenees Mountains that brought tourists and part-time residents in the summer months. Among the notable tenants was Pablo Picasso, who arrived in 1906 when the population stood at about 745 residents. The artist painted much of his famed “Rose Period” work in Gósol, riding the wave of what he called an “epiphany of inspiration.”
But the epiphany wasn’t enough to keep him there — he left Gósol before the end of the year, and so did many others in the decades since.
By 2015, the situation had gotten critical. The number of permanent residents was 120 and falling. The mayor went on television warning, among other things, that the school was about to close because it was down to five students. He asked for young families from elsewhere to repopulate the town.
Rafael López, a former renewable energy entrepreneur whose business collapsed in Spain’s 2008 financial crisis, was interested. “My mom said she saw this on TV,” said Mr. López. “And I said, ‘Well, what do you say if we take the car and go have a look, see what’s there?’”
Over the next months, hundreds of people came to Gósol to kick the tires. They said they were impressed by the quaint homes and the ruined castle atop the hill. There was the cool mountain breeze and the tinkling of cow bells heard over the hillsides.
In the end though, only Mr. López and two other families actually moved to Gósol in the years before the pandemic.
Mr. López, who said he was attracted to the isolated village in part because he “doesn’t really like people,” said the new life also came with its downsides. The town fiestas can get loud, he said. Last year, a winter storm left the town without electricity — and many with no heat — for two days. The two other families that volunteered to move with him eventually left.
As the coronavirus began to spread last year, Spain entered another economic crisis, this one on a scale even greater than the collapse that had brought Mr. López in 2008.
In Castelldefels, a seaside town southwest of Barcelona, life was starting to look upside-down for Ms. Calvar, the bar owner who came to Gósol in September. Spain’s lockdowns had decimated her pub. And after flights were canceled, her side-hustle as a flight attendant at a low-cost Spanish airline brought no reprieve.
“I’m a single mother with two kids,” said Ms. Calvar. “I had to say, ‘We’re going to ask the big life question now: What are we going to do?’”
The path seemed clear when, passing through Gósol one day, Ms. Calvar learned that the owner of the grocery store on the plaza was at looking to sell the business.
Ms. Calvar’s arrival heralded big news for the village: The 90-year-old owner was at last able to retire; the grocery store, one of only two in town, stayed in business; and Ms. Calvar enrolled her two sons in the school, which now has 16 students.
The schoolhouse sits along the plaza, a place of kid-sized chairs and tables, paper planets hanging from the ceiling and an incubator warming eggs. The two teachers sat inside the school on a recent day on lunch break. While the adult arrivals seemed to be starting fresh in Gósol, they said, the children seemed to be a bit haunted by the life they left behind.
“There’s a girl, there are two or three of them, who have become so closed, it’s hard for them to relate to others,” said Carla Pautas, the head teacher.
“It’s like they’ve become used to months being alone in the lockdown,” replied Anna Boixader, the other teacher.
Classes ended at 5 p.m. and Ms. Otero, the telecommuting web designer who had moved to Gósol from Barcelona last June, was waiting for two of her children, 6 and 7. She had something of an advantage over the other new arrivals: Her grandparents were from Gósol and she’d spent summers on their farm. Now her children were actually living in her family village.
There was a note of regret in her voice when she thought about the end of the pandemic, and the pressure that she knew would inevitably build to return to Barcelona. She didn’t want Gósol to disappear yet, she said.
Mr. Puig, the former mail carrier, was asking himself similar questions about how long the new arrivals would stay. So many had come and left over the years.
But he was sanguine. In his years delivering the mail, he says he got a sense of the place and had spoken to just about everyone in Gósol; retirement has allowed him to become philosophical about the fate of the village.
“When I was 10 years old, here in the plaza, when people started to sell their houses in the ’60s, everyone was going to Barcelona,” he recalled. “And people said, ‘If you stay here, who knows what you’ll do, before long there will be squirrels and foxes running around here.’”
He gestured to the street. Not a fox in sight.
“Well, that still hasn’t happened,” he said.
Roser Toll Pifarré contributed reporting from Barcelona.