Beijing: Chinese President Xi Jinping has issued a warning to separatists while on a visit to Nepal, saying attempts to split China will end in "crushed bodies".

Xi's visit to Nepal is the first by a Chinese leader in 23 years and his comments were partly aimed at the estimated 20,000 Tibetan refugees in the country which borders China.

Chinese President Xi Jinping, pictured in Kathmandu, Nepal, at the weekend. Credit:AP

But the graphic wording, and reference to separatists in "any part of the country", drew attention in Hong Kong, where protests have continued for four months.

"Anyone attempting to split China in any part of the country will end in crushed bodies and shattered bones. Any external forces supporting the split of China can only be regarded as a delusion by the Chinese people!" the official Chinese news agency Xinhua reported Xi as saying.