The railway to India was a lifeline for the small southern frontier town of Janakpur (AFP)

The railway to India for Janakpur, used to import everything from sweets to clothes and cosmetics.

Three years after its last train hit the buffers, landlocked Nepal is building a new railway network to boost its ailing economy -- helped by the rivalry between powerful neighbours China and India.The railway to India was a lifeline for the small southern frontier town of Janakpur, used to import everything from sweets to clothes and cosmetics and fuelling a vibrant border economy. But it fell into disrepair after years of neglect and since 2014, the train has sat stationary, its rusting carcass now a playground for local children, while Janakpur's markets are empty."When the train was running, we would have a lot of business. I was easily providing (for) my family," said Shyam Sah, whose small family-run cosmetics shop has suffered an 80 per cent drop in profits since the railway closed.Now it is being rebuilt with Indian backing, one of three new rail lines -- one funded by China in the north and a third by Nepal itself -- that the country hopes will help boost international trade.Nepal remains largely isolated from the global economy, dependent on aid and remittances. Growth slowed dramatically after a 2015 earthquake but is expected to normalise at 5 per cent from 2018 -- one of the slowest rates in South Asia -- according to the World Bank.In recent years it has courted its two large neighbours for investment in an attempt to plug itself into a rail network that links the far eastern reaches of Asia with Europe.But geography is not on its side.The Himalayas form a natural border between Nepal and China, leaving it largely dependent on India -- with which it shares a 1,400 kilometre open border -- for the majority of its imports and exports. In recent years, Kathmandu has tilted towards Beijing as part of a nationalist drive to decrease the country's reliance on Delhi.China has responded, ramping up its diplomatic ties with Nepal -- mostly through large-scale infrastructure investments. In 2017, Beijing pledged $8.3 billion to build roads and hydropower plants in Nepal, dwarfing India's commitments of USD 317 million. Feasibility studies are also underway for a Beijing- backed railway connecting Kathmandu to Lhasa in Tibet, cutting straight through the Himalayas at an estimated cost of $8 billion.Ankit Panda, senior editor at The Diplomat magazine, said that could be a game-changer for the small country. "The rail line with China holds potential depending on the demand side of the equation, on how China allows Nepal to leverage that link for commercial growth opportunities," he said.But it has strained relations between India and China, who are currently locked in a tense standoff on the remote Himalayan plateau of Doklam in Bhutan sparked by a new road being built by China."China knows that its chequebook diplomacy with the smaller Asian states is a sore point with India, which simply cannot afford to put up the kind of capital outlays that the Chinese promise," said Panda.The project is part of its "One Belt, One Road" initiative, a massive global infrastructure programme to connect Chinese companies to new markets around the world that critics see as a geopolitical powerplay. India has snubbed the plan and skipped a summit in Beijing in May.

The rail line is being rebuilt with Indian backing.

Delhi is funding the reconstruction of the Janakpur line, rebuilding the tracks to carry broad-gauge trains that will allow it to connect to the rest of the subcontinent's expansive rail network.Some experts warn that Nepal has become a de-facto battleground in a geopolitical struggle for regional supremacy between India and China -- a position that Kathmandu must navigate carefully. "None of them (smaller Asian nations) want to become a de facto satellite state," said Michael Auslin, Asia expert and fellow with the Hoover Institution. "But by having both India and China essentially compete over it, from one perspective it makes it a battleground, from another perspective it means that Nepal is playing the two off against each other," he added.Meanwhile, the people of Janakpur are eagerly awaiting the rail revival that will connect them to India once again. "When the train stopped, everything finished. Business has gone down for all of the city," said bookshop owner Rajendra Kusuwah. "After the new rail comes, it will open doors for development."