Eighty-five years ago this month, The Times waxed poetic about the latest triumph of British engineering - the construction of a short railway line from Peshawar to the Khyber Pass, "one of the most remarkable and romantic events that have ever taken place in Northern India".
The anonymous writer's passion was understandable. For his countrymen the pass, "Grim, black and forbidding, the gate of India" and home to the warlike Afridi tribesmen, with whom generations of British soldiers had clashed since 1839, had been "the scene of pestilence and vexation. Its span by a railway will be a relief untold."
The line, a mere 43-kilometre extension to the extensive network the British had already laid in India, and which terminated at the pass, owed "its inception to warlike needs alone", but there was something else: "Not only will the opening of the line be remarkable for the improvement it must bring to the defence of India, but also for ... the promotion of trade and the engendering of good will."
After all, noted The Times, "The Afghan trader has long complained of the time it took him to bring his goods from Kabul to [a] British railhead [in India], and it is conceivable that before many years are out we may see the line extended at the request of the Kabul Government ... as far as the valley and plain of Jellalabad."
For a while, it seemed that such a vision might come to pass. After the modernising King Amanullah took to the throne in 1919, he began work on a new capital at Darulaman and later hired German engineers to lay six miles of track linking it to Kabul - the country's first railway line. It opened in 1926, and two years later Reuters reported that a German company, Lenz, "has been given an order by the Afghan Government for the construction and maintenance of all railway lines in Afghanistan ... several German engineers were leaving for Afghanistan shortly".
But it was not to be. King Amanullah's modernisation plans fell foul of a reactionary backlash, leading to his abdication and exile in 1929. Afghanistan's railway plans were shunted into a siding. Since then, the three German steam engines imported for the Kabul-Darulaman line have lain unused - today they stand neglected in the grounds of the National Museum in Darulaman - but now, once again, the promise of a railway revolution is building up a head of steam in Afghanistan.
Next month, work is due to be completed on a study examining the feasibility of a 20-year plan by the Afghanistan government to build a rail network with the ambitious aims, according to one of the consultants working on the scheme, of "exploiting the country's mineral resources, reducing the cost of tortuous road transport through the mountains, and improving the mobility of the population in the hope of achieving some political stability".
The part of the plan that seems most likely to become a reality is a line running from Uzbekistan in the north to what is now Pakistan in the south. "The great thing about this line is that it would be the first link from the whole of central Asia down to the Indian ocean which is clear of Russia," said David Brice, a British railway consultant, speaking on Monday just hours before flying out to Afghanistan for his fourth and final visit this year.
Using the railways to deliver peace, he says, "is an obvious potential objective if the railway becomes sufficiently widespread ... Central government has never had much of a say in Afghanistan, it's never been a united country since it was formed. Each valley's got its own warlord; people can't get around easily, and that affects this Balkanisation." Railways, says Andrew Grantham, an editor at Railway Gazette International and an expert on Afghanistan's railway past, are capable of doing here what they have always done best: delivering sweeping socioeconomic change.
"Obviously, the railways opened up places such as north America, and to an extent it happened in central Asia when the Russian empire built the Trans-Caspian railway in the 19th century. And some people might argue it is what China is doing in Tibet."
There are three distinct but ultimately linked lines on the drawing board for Afghanistan. One would run more than 1,000km from Herat in the west across to Kunduz, via Mazar-i-Sharif. This would allow a link to Tajikistan via Sherkhan Bandar, and would connect to a 75-kilometre line from Mazar-i-Sharif up to Uzbekistan, on which work began in January and which could be complete by the end of the year.
This stretch alone, says Mr Grantham, "will make a big difference to ordinary people. Providing cheap transport and access to markets, it can only help the economy."
But if, as planned, it is connected with the Iranian network in the west - and Iran is also in the throes of building a railway, over the border to Herat - it would allow central Asian countries to bypass Russian influence and reach world markets via the Iranian port of Bandar-Abbas on the Arabian Gulf, to which the 2,000km journey would be only half as long as the distance to the Baltic.
The team is also dusting off a plan first considered by the British in the 19th century, to run a line from Chaman in northern India - now in Pakistan - to Kandahar, but the most dramatic progress yet has been east of Kabul, driven by hunger for Afghanistan's mineral wealth - especially its copper, vital to modern electronics and to China's exploding economy.
On September 22, the Afghanistan government signed an agreement with the China Metallurgical Company to construct, "if feasible", a line from northern Pakistan through Kabul to southern Uzbekistan, as part of its contract to exploit the Aynak copper mine, some 30 kilometres southwest of the capital.
When complete, said Wahidullah Shahrani, Afghanistan's minister of mines, the railway would "give substantial benefits for the Afghan economy in trade, employment and cheaper prices". Estimated to take five years to build, the line would be designed to carry all kinds of payloads, from copper and other minerals to agricultural products, passengers and other freight. Historically, Afghanistan has been wary of railways, seeing them with some justification as an instrument of imperial interference; railways have crept up to and over Afghanistan's borders before, but the cargo they carried has always been foreign military might.
In this region, one round of the Great Game between Russia and Britain for supremacy in central Asia was played out with train sets, says Mr Grantham. "Historically, materials to build a railway to Kandahar were kept ready in a warehouse in Chaman [on the then Indian border], and supposedly the Russians had equivalent materials in the north, so if Russia made a move on Herat, Britain could make a move on Kandahar, and vice versa."
Now, though, the tracks that the Russians ran from modern-day Turkmenistan to the border at Towraghondi during 19th-century aggression, and to Termiz in Uzbekistan to support the decade-long occupation of Afghanistan in the 1980s, could play a peaceful role in opening the central-Asian region. Likewise, Britain's dead-end Khyber Pass line, reduced to sporadic tourism until the modern conflict closed it and now partly in ruins after being damaged by floods in 2007, could prove a vital gateway to Afghanistan's future prosperity.
All of these plans, of course, face two barriers: money and security. The first of these, however, is probably lower now than it has ever been. Afghanistan's railway ambitions are being fuelled by the Asian Development Bank, the international institution whose mission is to help its developing member countries reduce poverty and improve the quality of life of their people. But the bank also has other, non-regional members, the biggest of which is the US, which accounts for about 15 per cent of the bank's capital and clearly has much to gain not only from ending the Afghanistan insurgency but also from opening up access to alternative oil supplies in the Stans.
Russia, which is not a member of the Asian Development Bank, is nowhere to be seen. In fact, says, Mr Grantham, it is the Great Game all over again, only fought with commerce, rather than guns: "It is absolutely fascinating. The politics and strategy happening now is exactly what happened 100 years ago." Can it be done? Although some of the terrain is challenging, says Mr Grantham, "in strictly engineering terms it's not going to be an insurmountable problem". The Chinese, says Mr Brice, have the most difficult task, running a line from Kabul through the mountains - "That's going to be a massive job, and nothing in the north can move without that being built" - but if anyone can build it, it's the Chinese, who have demonstrated they have the expertise.
The Qinghai-Tibet railway, the highest in the world, which was completed in 2006 and climbs through the Himalayas to link Lhasa in Tibet to the rest of China, is a comparable example, and only last month China announced it was extending the line from Lhasa to the city of Xigaze - a titanic 253-kilometre, four-year, US$2 billion engineering project, half of which will have to run through tunnels or over bridges.
Security, of course, is the key problem that will have to be tackled. Mr Brice, who has been sharing his 50 years of experience in the railway industry with Afghanistan for the past five years, on and off, says his age - he is "only 76" - has helped him to shrug off the obvious dangers in the country for westerners. He lives in guarded guesthouses and travels to the most remoteregions, where the railways will have to run, surrounded by armed guards. He has, he admits, "been held up and had one or two near-misses", but "I'm in the late stage of life and prepared to take risks that younger people aren't, perhaps".
But Mr Brice's gamble could, he believes, pay off for the people of this war-torn nation. "I think it will happen, slowly," he says. "People are waiting for the security situation to settle down or improve, of course, which is a massive factor, but it is a colossal opportunity. Copper, oil, iron ore, coal ... all this stuff's got no value unless it can be moved, so the railway is 100 per cent key to it all."
And, he believes, the Afghans may finally have lost their once well justified distrust of foreigners bearing blueprints for railways. "The local people we talk to are thoroughly behind it all. They want to be able to move around much more easily, and in safety. "Afghanistan never has been a self-sufficient country, and any move towards making that happen is clearly highly desirable. The whole population sees this; they are living in terrible poverty and they need access between labour and jobs and medical services. Everything hangs on a decent transport network, and this is the way to provide it."