BEIJING (Reuters) - China’s defense minister met the head of Afghanistan’s army, thanking him for Kabul’s support in fighting what Beijing says is an extremist group that seeks to split off its western region of Xinjiang.

Chinese Defence Minister Chang Wanquan delivers a speech as he attends the 5th Moscow Conference on International Security (MCIS) in Moscow, Russia, April 27, 2016. REUTERS/Sergei Karpukhin

China has long been concerned that instability in Afghanistan will spill over into violence-prone Xinjiang, home to the Muslim Uighur people, where hundreds have died in recent years in unrest blamed by Beijing on Islamist extremists.

The United States and the United Nations have listed the East Turkestan Islamic Movement (ETIM) as a terrorist group, though some experts have questioned its cohesiveness and say China’s policies in Xinjiang have contributed to unrest.

“I thank Afghanistan for its valuable support in combating ETIM terrorist forces and on issues related to China’s core interests,” Defence Minister Chang Wanquan told Afghan army chief of general staff Qadam Shah Shaheem.

“I hope the two militaries can continually enrich the shape and content of cooperation and make greater contributions to safeguarding both countries’ security and creating a favorable environment for joint development,” Chang said according to the official Xinhua news agency late on Sunday.

Afghanistan is willing to continue fighting ETIM by “deepening cooperation on personnel training and joint exercises and other means”, a statement on China’s defense ministry website cited Shaheem as saying.

The report and the statement did not give further details.

China is working with Pakistan and the United States to broker peace talks to end a Taliban insurgency that has raged for 15 years in Afghanistan.

That effort never got beyond exploratory talks and appeared to break down definitively when former Taliban leader Mullah Mohammad Akhtar Mansour was killed in a U.S. drone strike in Pakistan in May.

Sources in the Taliban told Reuters that a Taliban delegation visited China earlier this month, though Chinese officials have not confirmed it.

In public statements, the Taliban have said that they wish to have good relations with Afghanistan’s neighbors.

China says it does not seek to fill a security void created in Afghanistan since the U.S.-led NATO mission ceased combat operations there at the end of 2014. But it has promised to play a “huge” commercial role in helping rebuild the country.