BEIJING (Reuters) - China will provide Afghanistan with security equipment and training, President Xi Jinping told his Afghan counterpart on Friday, days after Chinese officials observed the first tentative peace talks between Kabul and the Taliban.

Pakistan hosted the talks aimed at ending more than 13 years of war in neighboring Afghanistan, where the Taliban have been trying to re-establish their hard-line Islamist regime after it was toppled by U.S.-led military intervention in 2001.

Beijing is keen to see a stable Afghanistan, worried about what it says are separatist groups in China's far western region of Xinjiang, which borders the Central Asian country.

"Increasing security cooperation suits both countries' interests. China will continue to supply Afghanistan with security supplies, technology, equipment and training assistance," Xi told Afghan President Ashraf Ghani during a meeting in Russia.

Xi is in the Russian city of Ufa for a summit of the leaders of the BRICS emerging nations, Brazil, Russia, India, China and South Africa, during which Afghanistan's security is to be discussed.

The statement did not give further details on Chinese assistance, but Beijing has long pledged security cooperation with Afghanistan and has been bracing for more responsibility there as U.S. forces have scaled back.

China says it does not seek to replace departing Western troops in Afghanistan but has promised to play a "huge" commercial role in helping rebuild the country.

(Reporting by Michael Martina; Editing by Jeremy Laurence)