Image copyright Alamy

It was one of the world's most opulent railway stations, sitting imposingly on the French-Spanish border - but then it fell into disrepair. Now, writes Chris Bockman, the building is showing new signs of life.

When they built the station at Canfranc, it was on a grand scale and with no expense spared. It had to be bold and modern - an architect's dream come true, built in iron and glass, complete with a hospital, restaurant and living quarters for customs officers from both France and Spain.

At the time it was nicknamed the "Titanic of the Mountains".

To give you an idea of its size - there are 365 windows, one for each day of the year; hundreds of doors; and the platforms are more than 200m long. The question is, how did such an extravagant station, high up on a mountainside in a village with a population of just 500 people, ever see the light of day?

Image copyright Alamy Image caption The ticket hall fell in to disrepair after the French abandoned the train line in 1970

At the turn of the 20th Century, the Spanish and French authorities had a grand project to open up their border through the Pyrenees, enabling more international trade and travel. It was a remarkably ambitious scheme, involving dozens of bridges and a series of tunnels drilled through the mountains.

At one point, work stalled as the French workers were sent off to fight in World War One. They were replaced by Spanish counterparts.

Image copyright Alamy Image caption Celebrating the digging of the Somport tunnel in 1912, which would form part of the international train line

The station was built just to the Spanish side of the border, but one of the platforms was still considered French territory - like a kind of foreign embassy. French police and customs staff sent their children to a French-speaking school installed in the village.

But the day the station was opened in 1928 by the French President Gaston Doumergue and Spanish King Alfonso XIII, flaws quickly became apparent.

The rail gauges were different, so passengers still had to change trains. It made transporting goods as freight too slow. The Wall Street Crash of 1929 didn't help.

Find out more

From Our Own Correspondent has insight and analysis from BBC journalists, correspondents and writers from around the world

has insight and analysis from BBC journalists, correspondents and writers from around the world Listen on iPlayer, get the podcast or listen on the BBC World Service, or on Radio 4 on Thursdays at 11:00 and Saturdays at 11:30 BST

In the early 1930s, as few as 50 passengers a day were using Europe's second-biggest train station. And then things got worse. During the Spanish Civil War, Franco ordered the tunnels on the Spanish side sealed off, to prevent his Republican opponents from smuggling weapons in.

When the international line re-opened during World War Two, however, the route was used by thousands of Jews and Allied soldiers to escape into Spain.

Image copyright Alamy Image caption Disused train carriages sit alongside the rails near Canfranc

Today, the mayor of Canfranc is Fernando Sanchez, whose father was a customs officer at the station - he told me it became a spy hub for the Allies, but the Germans also used the rail line to transport gold they'd stolen from Europe.

After the war, the French lost interest in the line and allowed it to deteriorate. When a train derailed on the French side in 1970, that signalled the end and France abandoned the line.

The Spanish were furious, according to Fernando Sanchez - there was an international agreement to maintain the line and the French were accused of breaking it. Canfranc's population, which had risen to 2,000 thanks to the station, dwindled to 500.

The grand building itself went to rot. The tracks rusted, the ceilings fell in with the harsh winter weather and vandalism did the rest.

Image copyright Alamy Image caption The bar at Canfranc station, which fell in to disrepair

But a few years ago the local government in Aragon decided to buy the place and restore it, claiming it was a major part of Spanish history. In the past four years 120,000 people have visited, wearing hard hats - ironically, far more than ever actually used the line when it was in service.

Nearly all the tourists are Spanish. They're fascinated by the station's size, and perhaps also a little proud of its symbolism - the image it projected to the world. There are now even two trains a day between Saragossa and Canfranc.

Now the Aragon government wants not only to refurbish the station as a hotel, but to build another one right next to it, and relaunch rail travel through the Pyrenees. The French regional government based in Bordeaux has agreed to reopen the line on its side too.

Its president, Alain Rousset, told me the route through the achingly beautiful Valley of Aspe will be branded the the "western trans-Pyrenean line" when it opens. He promised to find 200 million euros (£175m) to pay for it, and Brussels will offer matching funds.

Rousset says he has made a lot of enemies by pushing for this plan - pointing out that politicians in Paris had envisaged a motorway instead.

Graffiti scrawled on walls in the valley now read "Long live Canfranc". The line is back in favour.

If all goes to plan, the Titanic of the Pyrenees could be back in business within five years. I noticed that the massive wooden ticket counters at the station have already been restored.

Further reading

Image copyright John Sanderson Image caption Tower at diamond crossing, Walkerton, Indiana

Photographer John Sanderson discovered the delight of taking pictures as a 13-year-old, shooting the Strasburg Rail Road and its historic steam engine. Returning to the subject of railways in adulthood, he rebelled against his younger self and this time chose to photograph American railroads devoid of trains.

In pictures: The empty railways of America

Join the conversation - find us on Facebook, Instagram, Snapchat and Twitter.