The Tehuantepec line, which was built in the 1890s by Weetman Pearson, later a British MP, goes from the Caribbean port of Coatzacoalcos due south to Salina Cruz on the Pacific. It has more to offer than most of the world's railways but it makes its demands, and they include tolerance and patience.
I spent the evening before my journey in a style Graham Greene, who passed this way in the Eighties, would have envied. I drank coffee on the quayside with Rafael, the ferry superintendent, as he told me of his unpublished novel about the supreme wickedness of God. As he talked, he kept one eye on the vessel with its cargo of lorries, cars and passengers, watching its captain guiding it, in the gloom between the tugs and the supertankers, the kilometre across the black, deep Coatzacoalcos river. There are four ports on the river, which serve the giant oil refineries at Minatitlan and Pajaritos, a tropical Rotterdam whose lights and pipes were winking at us from across the water.
As I prompted, he dimly recalled the name of Weetman Pearson, later Lord Cowdray, engineer, oil man and founder of the Pearson empire - owner of the Financial Times - who came to this town to put it on the map and make money. "He laid out Coatza and did it very well, you know. He was a good planner," said Rafael.
Pearson, a Huddersfield man who was a genius at working out costings, arrived in 1896, having earned his fame by giving Mexico City, which was often under feet of putrid water for months on end, a decent drainage system. He had also constructed a real port at Veracruz, a thing that the Spaniards had never been able to do in colonial times. The Thatcher- like Mexican president of the day admired him, and got him to sort out an existing jerry-built line and construct the ports at each end which would make the Isthmus of Tehuantepec, the second narrowest corridor on the American continent, a serious commercial rival for the Panama Canal that was being built at the time.
Pearson completed the railway, and it is in use to this day - though no longer as vital or as profitable as in the time when it was the quickest connection between the US East Coast and California, and was gratefully used by the Hawaiian cane farmers to get their sugar to New York.
Given the violence and robbery that is sweeping the country, and the horror stories that are commonplace in the capital, I asked Rafael before we parted what precautions I should take against cut-throats on the train the next morning. He laughed. "There aren't any robbers on that train. The people who use it are so poor, they've got nothing to steal. No one goes round this country stealing goats and chickens."
Get to Coatza station any morning of the week at 6am, pay your 42 pesos and 50 cents at the cobwebbed ticket office which still contains some of Pearson's original office furniture, then walk a short way up the track to two rickety carriages. These are stuck behind a few motley goods wagons, the whole brought up with a yellow caboose with two little lookout towers on the roof. You heave yourself aboard, and in the dark take your pick of battered seats. Before the diesel growls into life, a boy has come round with the morning's Diario del Istmo.
Dead on 6.05am our train, half-filled with passengers, set off on the 302-kilometre journey to the Pacific, which was scheduled to take nine hours. I'd taken the precaution before leaving my hotel of vigorously emptying bowels and bladder, a sound idea given the smell coming out of the lavatory compartments. I had also brought food and water, though in view of what we were about to be offered, that was not so vital.
In the marshy meadows the horses were just beginning work, and children were playing round their palm-thatched huts. The maize fields were starting to show up green. Suddenly the carriage was filled with fresh and noisy young people in their Sunday best. "We're Seventh Day Adventists going to pray," said the girl who sat opposite me. "And that's our leader," she added, pointing to a fat young woman in Girl Guide uniform, sitting across the aisle. She simpered. Everybody seemed to be enjoying the journey for the simple reason that that is what trains are about.
As we began to climb out of the swamp more industry appeared, a sulphur works with acres of yellow mineral tipped on to the sidings, then a cement works, spotlessly clean and obviously managed with fearsome efficiency.
The young Adventists alighted at a halt as rapidly as they had arrived. They were replaced by a swarm of boys and women selling tacos, enchiladas, soft drinks, sweets, empanadas, bananas, oranges, and egg custards in little pots sprinkled with cinnamon. The fruit had been picked minutes before from trees that line the track. It is a well-rehearsed operation. The sellers all get on at the same station and alight half an hour later. I couldn't discover how they got home. They would have had to wait hours for the train in the opposite direction.
Then Fausto boarded. Only on the Tehuantepec railway could I have met Fausto. He is a 77-year-old Zapotec with a head such as you see carved in hundreds of prehistoric sites hereabouts. He had long since retired from his job as a telegraphist on the line; he showed me his rail pass with pride, and demonstrated that his wrist had lost none of its suppleness. His grandfather had worked on building the line, and he knew that "un ingles" had engineered it. Mexican railways weren't a patch on what they had been, he sighed. The sleeper from Mexico City to Merida in the Yucatan was no more. The expresses had been abolished, as a poverty-stricken system was put up for privatisation. He tut-tutted as we passed ruined halts where he had once tapped out his message, but his eyes lit up when we came to Ixtepec, where the station buildings were still in good condition, with a plaque bearing the date 1911.
As we rumbled along, he taught me polite phrases in Zapoteco, over a fresh orange cut in half and flavoured the Mexican way with salt and chilli. Then talk turned to how Tony Blair was doing.
At Matas Romero we stopped, 90 kilometres short of our destination. I strolled on to the platform, looked at a 100-year-old steam monster silent beside the platform, and chatted to the engineers. "The locomotive needs changing. It wasn't pulling," they explained.
I reported back to Fausto. "Don't you believe it. It's Sunday; no one much is travelling and the crew could do with two hours' overtime," said my Zapotec friend with an air of finality. I went back to my life of Nelson, and snoozed in the warm January sun. True to his prediction, the diesel returned after two hours and we set off again.
This stretch was magnificently mountainous and the line ran through deep cuttings where leathery bushes swept the windows. Then Fausto got off and a score of passengers boarded who had clearly been waiting for hours. "It's always like this. Sometimes the train comes half an hour early. But it's the only cheap way to travel from our village. There's no real road, and the minibuses cost a fortune," said one young woman. No one had goats or sheep on board, as Rafael had forecast, but one woman had a brace of fine white chickens.
Then we came out of the mountains and into the Pacific plain. Just short of Salina Cruz, the train stopped. No railway building, no platform, just a rusty iron sign in the wilderness with the single word "Pearson". Weetman Pearson's jetties are still to be seen at Salina Cruz, hemmed in now by a container port and Mexico's largest oil refinery a mile or two down the coast. I went into town and thought of the contractor over a couple of glasses of orange juice at a bar called the Hawaii.
Rumours abound that the Mexican and US governments are preparing plans to develop a shiny new railway, an eight-lane highway and bigger oil pipelines across the isthmus, so that, when the Panama Canal stops being US property and reverts to the Panamanians at the end of this decade, there will be a reliable alternative in case of any trouble. The locals complain that they are told nothing, but must be secretly resigned to the fact that the distant powers up in Mexico City seldom tell them anything anyway.
Development like that would certainly bring some much-needed money to the deep south of the country - Mexico's impoverished, corrupt and violent equivalent of Sicily. But I think it would also endanger one of the best train rides on this planet.