EIGHTEEN hairpin bends on a mountain road separate the four Alpine hamlets of Nâves (pictured) from the towns in the valley below. At this time of year villagers are busy preparing winter stocks: chopping firewood, harvesting sugar beet, or laying down carrots in crates of sand. A century ago 650 people lived in Nâves, tending cattle and living off the land. Today the figure is just 123. Yet for the first time in a century, the decline has reversed.

Across western Europe, once-populous hamlets like Nâves are challenging policymakers to find a way to keep services going and villages viable. Rural areas in most of Europe’s poorer regions, including the former east but also Spain, Portugal and Greece, are emptying out as younger generations head for the cities. Yet after decades of decline, France’s villages have been growing again—even in unfashionable parts that tourists seldom reach. In 1982-1990, the remotest rural areas in France were still losing 6,400 people a year. By 1999-2007, those same areas had recorded an annual net gain of 59,800 .

The reasons are a mix of public policy and changing aspirations. France’s strong transport links and public services help to make village life workable. Even today, the school bus drives up each morning from the valley to collect just eight primary-school pupils from Nâves. The beat of nature attracts former city-dwellers known as néoruraux: those who decamp to remote parts now that the internet allows them to indulge their desire for isolated living without truly disconnecting.

For older residents in Nâves, this is welcome. “When I was a kid in the 1950s there were 60 children in primary schools here, and the baker drove up with fresh bread each morning; now that’s all gone,” says Lucien Delapierre, whose 97-year-old mother still lives in the village. But today there are trampolines and little bicycles outside the new wooden chalets on the village edge, where younger families have settled. Nâves has also lured some néoruraux. “New technology gives old villages a future,” says Jacques Delorme, who runs an IT business and lives in Nâves.

The difficulty is how to make such a fragile uptick sustainable. Nâves is only 42km (26 miles) by road from the glitzy ski resort of Courchevel, but no tourists venture up this side of the valley. Services are stretched too: there is no bus, doctor, school, shop or café. Patrick Gohel, the mayor, notes that if the number of children drops again, the school bus cannot be guaranteed. The nearby hospital in Moûtiers has closed its accident and emergency department. It used to specialise in bone surgery, thanks to the ski resorts. Now, under a rationalisation plan, Moûtiers is supposed to specialise in gerontology.

Alpine villages are sheltered from the worst cuts by the relative vibrancy of regional cities like Lyon and Grenoble. Other rural parts are under more strain, notably the Massif Central in the country’s hollow middle. There is a general sense that rural needs are not a national policy concern. Mindful of this, François Hollande, the president, last month launched a new scheme to improve rural services. He promised that by 2017 some 1,700 newly qualified doctors would get a bonus for working in remote places, and that high-speed internet will be extended into remote corners of the land. But with France’s strained public finances, he has only meagre sums to back his words.

Back in Nâves, there is a form of upland resilience. Some locals still use the icy running water, piped into the stone troughs in the village centre, for washing vegetables. At this time of year, they are collecting walnuts and edible mushrooms from the hillside forest. But winters are harsh and the hairpin bends can be treacherous in the snow. Cold and isolation can challenge rural romanticism. Rural villages like this are not on the way to anywhere, and nobody arrives by chance. “To live here,” says Mr Delapierre, “you have to like solitude.”