'The last time I took that train, you couldn't see out the window for guards and guns," a tour guide told me the day before I boarded the Tren de la Sierra, the highest railway in the world. She had taken her family on a weekend trip to the mountains in 1991 and for the entire 12-hour journey they had been terrified.
It had been at the height of a brutal campaign by Peru's Maoist terrorist group Sendero Luminoso (Shining Path). The railway, which carried minerals and food from the Andes, was a favourite target. Twenty crewmen were killed in attacks, the passenger service was forced to close and the province was brought to its knees.
Today was the first time that the jaunty little red and yellow diesel train had picked its way out of Lima for more than 10 years, and the scene that greeted me was very different from the one the guide had described 12 years ago.
The rebel leaders had been arrested and the guns had gone. There was a guard onboard, but he was wearing a truncheon and a big smile. "Look! No gun!" he beamed and lifted his red waistcoat to prove it.
Well-wishers shouted through a misty pink dawn: "Safe trip! Good luck!" Children ran alongside the train whistling and waving at what may have been the first passenger train they had ever seen, and motorists stopped for a snapshot.
This historic railway line is part of Peru's rich national heritage, and the re-opening of this limited passenger service is a symbol that the country is back on its feet again, a local tour guide told me later.
In my carriage, passengers were settling themselves into the lazy routines of rail travel. A man was trying to choose between chocolate and wholemeal biscuits on the tea-trolley. Books, cards and neatly wrapped sandwiches appeared from nowhere and, with the crowds outside dispersing, I had little to do but wonder what was for lunch. It was only 8am, one hour into the journey.
I went for a walk around the train. It comprised six spacious carriages, each with rows of big comfortable green seats, and tables with crisp, cream tablecloths. It was full of Peruvian families and young couples murmuring excitedly about thejourney ahead. Each had paid the equivalent of $30 for the return trip - a daily wage for a teacher.
Returning to my seat, safe in the knowledge that I was in the nicest carriage, had the best sightseeing position and was surrounded by the most handsome men, there was now nothing to do but stare out of the window as the last of Lima's suburbs shrank away and the dusty blue foothills of the Andes loomed ahead.
For six hours, we would be climbing steeply and laboriously from sea-level to the frozen wilds of the Andes at 4,829m. We'd cross 59 bridges, rumble through 66 tunnels and swing round 22 zigzags - the only way for the train to climb sheer cliff faces. In the afternoon, we'd travel along a high, fertile plateau until finally sliding regally into Huancayo, 12 hours and 335km east of Lima.
Promoted by US entrepreneur Henry "where-a-llama-can-climb, I-can-lay-track" Meiggs, the railway line took 38 years to build at a painstaking rate of just 9km a year. Floods and landslides hampered progress, more than 2,000 workers died from disease and the project nearly bankrupted Peru, but it opened up the vast mineral and agricultural wealth of the Andes to Lima and world markets. On its completion in 1908, the track was lauded as an engineering wonder of the world.
I settled into my seat with my first cup of coca tea - a bitter-tasting traditional remedy for mountain sickness. I knew from a trip to Tibet that I was a candidate for altitude sickness, and the medicine I had taken there to fight off the headaches hadn't worked.
A nurse carrying a green oxygen cylinder came by, introducing herself to the passengers, warning them to stay clear of fizzy drinks and sweet snacks. "Anything in your stomach will be vomited up," Llelia told us. "And it's better if you don't move around too much. But if you feel ill, I'm here. I have everything you'll need," she said sweetly and floated off.
By now, we had climbed into the pink-walled Rimac valley, lush with corn fields, cactus and daisies. Ancient Inca terraces fringed impossibly steep mountainsides.
We made our way up through steep-sided valleys. The train clung to the edges of sheer and crumbling cliffs, rattled along lofty bridges and zigzagged up sheer mountainsides, leaving me dizzy and disorientated. At times, rock faces were less than a metre from my window, and I felt like I was at the bottom of a well.
As we topped 3,500m, the air became dry and brittle and passengers dozed off. A dull pain thumped in my head. I drank some more coca tea. It seemed to work.
There was nothing outside now; just gnarled grey rocks and a huge open sky. No birds, no trees, no people. It was a rugged, wild land; empty and lonely. The rocks had a dazzling metallic glow and there were no shadows.
When the train reached Ticlio, at 4,829m the highest point on the route, I realised that in the last three and a half-hours we had covered just 100km. My headache was no longer falling for my cheap coca tea trick. It was a thick black pain which made my eyebrows heavy and my lips fold inside my mouth. At this height, there is 40% less oxygen in the air than at sea-level and to adapt, heart rate rises and breathing almost doubles. An oxygen cylinder was required on this train by law. Most of the passengers were now slumped in their seats, open mouthed, gasping for air spasmodically like fish out of water. Between them was Nurse Llelia, scattering pills and administering oxygen.
I stumbled outside to take a souvenir picture of the summit. The cold bit deep. I tottered around like a drunk in the rarefied mountain air, feeling high and shell-shocked. A man bent over to take a photo of the train and fell over.
The train lurched off again and we dropped to a 3,700m plateau of beautiful glacier lakes and snow-capped mountains. The air was softer, the light less harsh and my headache faded. Passengers started reviving themselves and, after a two-course lunch, the mood on board the train improved considerably.
For the next hour, we bustled past a string of one-llama towns. Wizened old women wearing trilbies, long socks and petticoats waved us along. A rogue polo player sporting flowing robes galloped across the plains and random llamas with red ribbons tied to their ears pouted insolently at us from the trackside. It was 3pm now, eight hours into the journey. A string of ugly mining communities followed. In La Oroya, a smelting town, the stink of thick sulphur corroded my throat and made my eyes burn.
"Nothing grows here for a 16-mile radius," a local worker told me on the station platform. "Our lungs are like rocks," said another.
We then dropped down into a fertile valley of potato and corn fields, and passed Jauja, Peru's first colonial capital, founded by the Spanish conquistador Francisco Pizarro in 1543. It was getting dark now and an inky lilac sunset spread across the sky.
At Concepcion, just a few miles from Huancayo, several hundred people had been waiting in the cold mountain evening to give us a royal reception. When we rattled in, a 16-piece brass band started playing what sounded like the theme tune to the movie Grease, and families of Indians tried to peer into the train and hand us flyers for guesthouses and restaurants.
As we arrived, ragged and weary, in Huancayo, a tour guide on the train explained to me: "There is a whole line of communities that used to depend on this train. It brought tourists and wealth to their markets. Now these people can hope again. Tourism is our number one market. It is our future."
I felt privileged to be part of it.
Way to go
Getting there: Journey Latin America (020-8747 8315, journeylatinamerica.co.uk) offers an 11-night itinerary including the train journey to Huancayo and visits to Cusco and Machu Picchu from £1,763pp. The price includes guided excursions to Jauja and nearby Andean villages, and international and domestic flights. The Tren de la Sierra runs six times a year, once a month from April to October.
Further information:
Country code: 00 51.
Flight time: London-Amsterdam: 1½hrs.
Amsterdam-Lima: 14hrs, 40mins.
Time difference: -6hrs.
£1= 5.56 nuevas soles.