GORRETO, Italy (Reuters) - Gorreto, population: 105, was always small, but now the tiny village, nestled in a river valley in northern Italy, is on the brink of extinction.

Most of the remaining residents are over 60 and the primary school attended by Mayor Sergio Capelli, 72, closed about 30 years ago - a stark example of the nationwide demographic decline as Italians live longer and have fewer babies.

"To witness the slow death of the valley makes me sad," says Capelli, a retired railway engineer who hopes to attract people to the town by organising cultural events. "I am trying to save all these villages," he says.

All along the Trebbia river valley, where tiny villages are dominated by the snow-topped Alpine foothills, the picture is the same.

In six villages near Gorreto all the schools have closed and harsh snowy winters prompt most of the elderly residents to spend the season with relatives in the milder climes of the city of Genoa, on the Ligurian coast.

The Val Trebbia area is an extreme example of the demographic problem in Italy, whose median age of 44.2 is the world's fourth highest, after Monaco, Japan and Germany, according to the CIA World Factbook.

Longer life expectancy and falling fertility rates have meant Italy's population has been steadily ageing for decades. But the longest and harshest economic crisis since World War Two has made matters worse.

As unemployment has risen to a record 12.7 percent, much higher among younger people, immigration has fallen by a third since 2007. At the same time, emigration, of mainly young highly-educated Italians, has doubled.

"Undoubtedly, it is thanks to immigration that Italy has avoided over the last 10-15 years a demographic collapse," said Antonio Golini, interim head of national statistics institute ISTAT.

"To counter its low fertility rate, Italy would need prolonged mass immigration. But given it is grappling with high unemployment and an economic crisis, it cannot afford it."

NEW LIFEBLOOD

The region of Liguria, where the port of Genoa and a string of busy beach towns are a stark contrast to the scarcely populated villages that dot its rugged interior, has Italy's highest percentage of residents aged 65 or older, and the lowest birth rate.

Italy's average age of 43.6 rises to 47.9 in Liguria, ISTAT data for 2011 shows.

But there is some hope for the region's struggling economy.

Younger immigrants - mainly from Romania - are beginning to move to the Val Trebbia area, finding jobs helping the elderly or in manual labour like brick-laying.

A quarter of the children attending the primary school of the town of Rovegno that now serves the whole Trebbia Valley have immigrant parents. The only child born in Gorreto last year was the daughter of a Romanian couple who moved there in 2009. Another baby, born the previous year, left as his family moved away.

"Maintaining the school is costly. But without the school this valley would simply die," says Marcella Delle Piane, a literature teacher who has spent 26 years at the school.

For entrepreneur Paolo Salomoni, the very fact that the area is an aging backwater presents its own opportunities.

While the windy 55-km (35-mile) road to Genoa was often blamed for preventing economic progress, forcing generations to emigrate to seek work, it also meant the area was saved the aggressive industrialisation that gutted the landscape in some other parts of Italy, leaving the pristine environment a potential tourist draw.

"The place is remote, but it's a paradise. There aren't many green valleys like that left in Italy," said Salomoni, 49, a Genoan who ditched his job at a large oil company to buy the local Miramonti hotel four years ago.

With the Trebbia river renowned for its trout fishing, Salomoni, who took the hotel over from an elderly local couple and moved to Gorreto with his Romanian wife, says business is good.

"We are actually growing."

(Editing by Alessandra Galloni and Robin Pomeroy)