SAN XOÁN DE RIO, Spain—The small building in a village near this town was once a school filled with children. Now it is a mortuary, a stark illustration of the demographic forces shaping Europe’s future.
It has been years since there were enough children to sustain a local school in many villages in this rural corner of Galicia, northwestern Spain, that have been hollowed out over decades by migration to cities and low birthrates. Other defunct schools have been left to crumble, or in some cases repurposed as social centers for the elderly, who now make up a majority of the population.
If Europe is already the world’s oldest continent—with a median age of 44 in 2020, forecast to reach 48 by 2050—parts of this region are a sign of the future. The average age in some municipalities in the province of Ourense, where San Xoán de Rio is located, is already above 60.
For years, mayors of such towns have struggled to prevent their communities from dying out. The pandemic offers a new challenge, but also some glimmers of hope.
The long-term impact of Covid-19 on demographic trends looms large. Birthrates across Europe fell during the first year of the pandemic, amplifying a trend that is set to have far-reaching consequences for economies across the continent, with a shrinking pool of working-age people forced to support a growing elderly population.
While birthrates have since rebounded in some countries, restrictions on international travel have reduced the flow of migrants into Europe. That deprives Europe of new arrivals whose higher fertility rates have been critical in keeping the population of some European countries from falling even faster.
At the same time, the pandemic has driven some people out of cities to rural municipalities where Europe’s demographic challenges are most pronounced. In Spain, the share of housing transactions that were in rural municipalities rose to 15% in September 2020 from 11% between January 2013 and December 2019.
The pandemic came just in time for the municipality of Vilariño de Conso, whose nursery was at risk after the number of children slipped below the minimum threshold of six. “We’ve been on the brink for several years,” said Mayor Melisa Macia Dominguez. The return of several young couples over the course of the pandemic added five children to the register, guaranteeing the nursery’s survival for the next few years at least. “It has given us breathing space,” she said.
Now looking to rebuild its economy after the pandemic, the national government in Spain—where birthrates haven’t recovered from the pandemic decline—is pledging a slice of billions of dollars in European Union structural funds toward addressing rural depopulation, a hot political issue.
As Spain went into lockdown in 2020, a trickle of people returned to San Xoán de Rio. The numbers were relatively small, but every head counts in a place where there are at most two births a year and 10 times as many deaths. For the first time since 1950, the population didn’t shrink in the first year of the pandemic, stabilizing at about 500 inhabitants, and was on track to have grown slightly in 2021.
The question now is whether Mayor Jose Miguel Perez can build on those gains as people learn to live with the virus and old habits re-emerge. “We need to keep them,” he said.
There isn’t much Mr. Perez can do to boost falling fertility rates, a trend that has vexed policy makers across Europe for decades. Nor does he have the means of some wealthier municipalities, which he says have offered parents financial incentives to settle with their children. But he hopes the pandemic has given him a fighting chance.
Mr. Perez opened a remote working center at the height of the pandemic that he says was in high demand over the summer when many people return to spend their holidays here. He also set up a kids summer camp and a paddle tennis court.
Reviving the local school is a coveted—if distant—goal. “Children are the future,” Mr. Perez said.
The school closed 12 years ago when the number of pupils fell below a minimum threshold of six. But at least 15 children are needed for local authorities to reopen it, and there are only eight in the whole of the municipality of San Xoán de Rio, covering about 50 villages in an area of about 25 square miles.
Last year, he cleared desks coated with more than a decade of dust out of the classrooms and turned the school into an indoor playground, part of his long-term strategy to foster a sense of attachment to the town in the younger generation. If he succeeds, Mr. Perez hopes there will one day be enough children to restore the school to its original purpose.
For now, he is focused on the more modest goal of getting people to visit more often or stay longer during the holidays to stimulate the local economy.
Decades of population loss have sent this and other small towns like it into a downward economic spiral.
One by one, businesses in San Xoán de Rio have closed as their owners retire, making life increasingly difficult for the remaining residents. Along the main street, a handful of surviving businesses stand out among closed stores that used to be a supermarket, a restaurant and a local bank branch. To withdraw money, residents must now drive more than 8 miles to the closest ATM or wait until a Thursday, when a mobile bank bus passes through town.
The biggest employer is a care home for the elderly. Real-estate prices have slumped, with one exception: burial plots. Life moves slowly in San Xoán de Rio, revolving around a medical center and a bar.
“It’s like an open-air retirement home,” said Mr. Perez, who at 39 is among the town’s younger residents. Many of the people who returned during the pandemic were themselves retired.
Alberto Lopez Perez, 39, quit his job at a car factory in Madrid and returned here with his wife, who gave birth eight months ago. Becoming parents has brought the challenges of living here into sharp relief; the couple was forced to register their newborn in another municipality because he needs regular medical care and there is no pediatrician in San Xoán de Rio. In the future, Mr. Lopez Perez fears his son will struggle to find work, like he has.
“You can either work for the town hall or the care home,” said Mr. Lopez Perez, who is eking out a living from beekeeping and doing odd jobs for the town hall.
“Or as a gravedigger,” quipped Luis Fernandez Lopez, 34, who works for the local funeral services.
Agriculture is no longer viable for most and the mayor’s efforts to lobby companies to move to this remote region have met with little success.
The mayor, a former telecommunications engineer, has made better progress toward connecting San Xoán de Rio with the rest of the province by bringing high-speed internet to the municipality.
For older residents, many of whom have never used a computer, the town hall is now offering computer literacy courses. Amazon delivery vehicles—once a rare sight—are now spotted daily on the roads as the pandemic accelerates a shift toward online shopping.
Write to Isabel Coles at isabel.coles@wsj.com
Copyright ©2022 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8