Ihope Eloy Alfaro had a sense of humour. If he did, then perhaps the former Ecuadorian president allowed himself a wry smile as he was transported to jail on the railway he helped to create. Ousted from power on account of his secularist policies, the plucky politician staged an ill-fated comeback in 1911, which led to his subsequent arrest in the port city of Guayaquil. His custodians packed him on a train to face justice in Quito, which was eventually meted out by a Catholic lynch mob, who stormed the prison and dragged his body through the cobbled streets of the Old Town.
Time has given Ecuador a chance to reflect on Eloy Alfaro and today he is a revered figure. There's a portrait of him hanging on the wall at Quito's Chimbacalle station, which is the centrepiece of a $280m (£187m) project to restore the country's railway network.
Set in a picturesque valley some 2,800 metres above sea level, Ecuador's lofty capital sits just 25km south of the equator. Its historic Old Town is a splendid maze of cobbled streets, colonial architecture and churches, dazzling attributes which helped it become Unesco's first World Heritage Site (along with Krakow) in 1978.
Threading through the rush-hour crush (the traffic here is abysmal) I make it to the station in time to catch the first train of the day. Departing under the watchful gaze of Eloy Alfaro, we rattle through the suburbs of Quito, passing front doors which open to reveal waving children, barking dogs and the odd curmudgeon who doesn't seem to be entering into the spirit of things. Men on motorcycles escort our train out of the city, warning those ahead of the locomotive's approach. "They aren't used to it yet," explains my guide, Cecelia, as we leave Quito and climb into the misty countryside.
The line was inaugurated last December by president, Rafael Correa, whose administration has masterminded the revival of Ecuador's railways. Restoration work began in 2008 and after much anticipation the first successful test run between Quito and Guayaquil was completed in April. The historic route was officially unveiled last Tuesday and now features a luxurious service aimed at the well-heeled traveller.
They will chug along this very stretch out of Quito and into Ecuador's charming countryside, where I'm greeted by grazing cattle and waving farmers. This lazy, rural scene belies the violent activity going on beneath us. This is the "avenue of volcanos", a series of lava-spewing mountains that has devastated this region before and will devastate it again. Some geologists claim a big eruption is due.
Thankfully, all is quiet when I hop off the train at Machachi to visit Cotopaxi, which at 5,897 metres is Ecuador's largest active volcano. "When she erupts, that's it for this valley," says my guide, cheerfully, as we reach its base.
In spite of her fearsome reputation, Cotopaxi hides behind a veil of cloud so we hike around the foothills to admire the flora and fauna. It's a glorious stomp but marred for me by a bout of altitude sickness, which eases over a bowl of quinoa soup at the nearby Tambopaxi Lodge. Also easing is the cloud; finally, a snow-covered Cotopaxi reveals herself, looming over the valley full of grace and menace.
Passengers are able to hop on and off Ecuador's railways as they please, depending on what they want to see. However, one of the biggest attractions is the track itself, when it snakes up the infamous Devil's Nose, a snout-shaped mountain widely regarded as the toughest test for trains on the planet.
As we zigzag through switchbacks and skirt along track laid inches from the rocky precipice, it's easy to see why this route has earned the bragging rights to such a title. Completed in 1902, a more fitting name for this Ecuadorian railroad might have been the Devil's Noose; of the 5,000 workers who constructed it, half were condemned to death by the harsh working conditions. A small museum at Sibambe station explains how a fatal combination of disease, dangerous topography and dynamite accidents sealed the fate of the workforce.
At Sibambe station the local indigenous community, resplendent in their traditional dress, greet us with singing and dancing; a market sells handicrafts. "The railway line is good for our community," enthuses Manuel Mendoza, the poncho-wearing museum curator. "Before there was no restaurant, no bar and no museum, but that's changed and now people here have work."
Ecuador's railways fell out of fashion during the Seventies as the nation took to the roads. "The Pan-American highway was quicker and easier," says my guide, Edison Palomeque, as we sip coca tea at the station. He then explains how the redundant railways suffered in the harsh Andean environment; rain washed sections of track away and landslides buried other segments under mud and rocks.
By the first few years of the 21st century only two sections remained open, both purely for sightseeing and operated by private tour companies.
But a new epoch beckons for the railways – and the opening of the Quito to Guayaquil route won't be the end of it. In fact, in many ways it will be the start of something even bigger, as plans are afoot to revive another historic line between the Devil's Nose and Cuenca, a Unesco World Heritage city known for Renaissance architecture, leafy parks and Panama hats (which are made in Ecuador rather than the Central American nation).
The station in this charming town is currently being reclaimed by Ecuador's lush vegetation, but not for much longer; this defunct transport hub will throng with passengers once again when Cuenca is hooked up to the rest of the network.
That isn't scheduled to happen for a few years yet, although its people are used to waiting.
"While the rest of Ecuador was constructing railway lines, our town decided to build this church," explains local guide, Javier Guerrero, as he shows me around the city's magnificent Catedral Nueva. "They started building this in 1885 and guess what – it's still not finished."
Gavin Haines travelled with KLM (0871 231 0000; klm.com) which flies to Quito with a change in Amsterdam and a stop in Guayaquil on the return journey. Iberia (0870 609 0500; iberia.com) also flies via Madrid. Other connections are available via Miami.
The writer travelled with Metropolitan Touring (001 888 572 0166; metropolitan-touring.com), which offers tailored tours of Ecuador including Quito, Cotopaxi, the Devil's Nose, Inca ruins, Cuenca, and Guayaquil. Prices start from US$676 (£450), which includes travel, accommodation and meals. Flights extra.
More informationReuse content