(This version of the August 31 story corrects paragraph 2 to clarify the agreement was signed by officials, not prime ministers)

KATHMANDU (Reuters) - India will help Nepal construct a rail link between capital Kathmandu and an Indian border town for smoother movement of passengers and cargo to the landlocked Himalayan nation, which neighboring China is also trying to woo with a similar plan.

An agreement to study the feasibility of a rail line linking the two countries was signed by officials on Friday during a meeting between Nepal’s Prime Minister K.P. Sharma Oli and Indian premier Narendra Modi on the sidelines of a regional summit of seven South and East Asian countries.

India’s Konkan Railway Corporation Ltd will conduct a preliminary engineering and traffic survey for the rail line, India’s embassy in Nepal said in a statement.

The planned 130 km (80.78 mile) line from the Indian border town of Raxaul in eastern Bihar state to Nepalese capital Kathmandu, once built, will just be the second rail track in the mountainous nation. Nepal’s only railway link is a 35 km stretch in its southern plains.

Construction of the rail line and its funding will be finalised after the Konkan Railway submits its findings, officials said.

The bulk of Nepal’s overland foreign trade is routed through Raxaul and accounts for nearly two thirds of all trade in the landlocked nation. Imports by roadways are often delayed and expensive as cargo is carried in diesel-guzzling trucks.

“The Raxaul-Kathmandu rail line is expected to expand connectivity by enhancing people-to-people linkages between the two countries and promoting economic growth and development,” the Indian embassy statement said.

Nepal, wedged between China and India, is seeking to lessen its heavy dependence on New Delhi for trade and the supply of essential goods such as fuel, as it tries to improve connectivity with China.

China has already conducted a pre-feasibility study for a 70 km (42 miles) link connecting Gyiron in Tibet with Kathmandu, making it one of the most ambitious infrastructure projects in the rugged Himalayan mountains.

Political analysts say India’s plan to build the rail link in Nepal comes as New Delhi jostles with Beijing to wield greater influence over smaller neighbors.