Xi Jinping's comments came as Beijing is putting pressure on Kathmandu.

President Xi Jinping warned on Sunday that anyone attempting to "split" China will be "crushed" as he held wide-ranging talks with Nepal's top leadership and the two countries elevated their bilateral ties to strategic partnership and signed a slew of agreements, including a plan to build a trans-Himalayan railway line.

During his meeting with Nepalese counterpart Bidya Devi Bhandari on Saturday, President Xi Jinping announced the support of 3.5 billion RMB equivalent to Nepalese Rs 56 billion to Nepal over the next two years to help the development programmes, officials said.

Xi Jinping, the first Chinese president to visit Nepal in 23 years, also pledged to upgrade the Arniko Highway linking Kathmandu with Tatopani transit point - which was shut down following the devastating earthquake of 2015 - and open more customs points facilitating connectivity.

He said a feasibility study of the trans-Himalayan railway will soon start and China will also support the construction of the Kerung-Kathmandu tunnel road.

During his meeting with Nepal Prime Minister K P Sharma Oli on Sunday, Xi Jinping said that "anyone attempting to split China will be crushed and any external force backing such attempts will be deemed by the Chinese people as pipe-dreaming," China's official Xinhua news agency reported.

Xi Jinping's comments came as Beijing is putting pressure on Kathmandu to rein-in pro-Dalai Lama Tibetans in Nepal.

Nepal shares a long border with Tibet and is home to around 20,000 Tibetan exiles. Every year some 2,500 Tibetans illegally enter Nepal crossing Tibetan border on their way to Dharamshala to meet the 84-year-old Dalai Lama.

Beijing views the India-based Dalai Lama, the spiritual leader of the Tibetan people, as a separatist trying to split the Himalayan region from China.

Oli said Nepal firmly supports China in safeguarding its sovereignty and territorial integrity and stands firm in upholding the one-China policy.

Nepal, added Oli, will never allow any force to use its territory for separatist activities against China, the Xinhua report said.

Xi Jinping stressed that his country appreciates Nepal for its firm adherence to the one-China policy and its staunch support for China on issues concerning China's core interests.

Calling Nepal and China true friends and partners, Oli said the two countries have always respected each other, supported each other and never interfered in the internal affairs of the other, adding that their traditional friendship is unbreakable.

In a joint statement, Nepal and China also expressed satisfaction with the signing of the agreement on the Boundary Management System, which will improve the level of boundary management and cooperation for both sides.

The two sides were also satisfied with the signing of the treaty on mutual legal assistance in criminal matters and expressed hope for an early conclusion of the treaty on extradition.

There have been concerns that Beijing can use the extradition treaty against Tibetan supporters of the Dalai Lama living in the country. Experts worry that Beijing is pressing to sign the extradition treaty mainly to extradite Tibetans involved in "anti-China" activities in Nepal.

Nepal and China decided to elevate their bilateral ties to a strategic partnership of cooperation and two sides agreed to respect each other's independence, sovereignty and territorial integrity, and respect and accommodate each other's concerns and core interests.

The Nepali side reiterated its firm commitment to One China policy, acknowledging that Taiwan is an inalienable part of the Chinese territory and Tibet affairs are China's internal affairs, the joint statement said.

The Chinese side reiterated its firm support to Nepal in upholding the country's independence, sovereignty and territorial integrity, and its firm support and respect to Nepal's social system and development path independently chosen in the light of Nepal's national conditions, the statement said.

The statement said that Nepal and China take the Belt and Road Initiative, a pet project of President Xi Jinping, as an important opportunity to deepen mutually-beneficial cooperation in all fields in a comprehensive manner.

The two sides agreed to intensify implementation of the Memorandum of Understanding on cooperation under the BRI to enhance connectivity, encompassing such vital components as ports, roads, railways, aviation and communications within the overarching framework of trans-Himalayan Multi-Dimensional Connectivity Network with a view to significantly contributing to Nepal's development agenda that includes graduating from LDC at an early date, becoming middle income country by 2030 and realising the SDGs by the same date.

The two sides agreed to conduct the feasibility study to launch the construction of the cross-border railway and reiterated their commitment to extend cooperation on the Kathmandu-Pokhara-Lumbini Railway Project.