Chinainfo-icon told a visiting Taliban delegation on Wednesday it expected the insurgent group to play an important role in ending Afghanistaninfo-icon's warinfo-icon and rebuilding the country, the Chinese foreign ministry said.

Nine Taliban representatives met Foreign Minister Wang Yi in the northern Chinese city of Tianjin on a two-day visit during which the peace process and security issues were discussed, a Taliban spokesperson said.

Wang said the Taliban are expected to "play an important role in the process of peaceful reconciliation and reconstructioninfo-icon in Afghanistan", according to a readout of the meeting from the foreign ministry.

He also said that he hoped the Taliban would crack down on the East Turkestan Islamic Movement (ETIM) as it was a "direct threat to China's national security", according to the readout, referring to a group China says is active in the Xinjiang region in China's far west.

Beijing has regularly blamed ETIM, a separatist group largely comprising members of ethnic Uighur descent, for attacks as it justifies its measures in Xinjiang, where rights groups say that one million or more Uighurs or other Turkic-speaking, mostly Musliminfo-icon people are incarcerated in camps.

But scholars say that China has produced little evidence that ETIM is an organised group or that it is to blame for attacks in Xinjiang, which separatists call East Turkestan.

Last November, the United Statesinfo-icon had removed ETIM from its list of terror groups, citing a lack of evidence regarding its existence.

The Taliban visit to China was likely to further cement the insurgent group's recognition on the international stage at a sensitive time even as violence increases in Afghanistan. The militants have a political office in Qatarinfo-icon where peace talks are taking place and this month sent representatives to Iraninfo-icon where they had meetings with an Afghan government delegation.

"Politics, economyinfo-icon and issues related to the security of both countries and the current situation of Afghanistan and the peace process were discussed in the meetings," Taliban spokesperson Mohammed Naeem tweeted about the China visit.

Naeem added that the group, led by Taliban negotiator and deputy leader Mullah Baradar Akhund, was also meeting China's special envoy for Afghanistan and that the trip took place after an invitation from Chinese authorities.

Security in Afghanistan, with which China shares a border, has been deteriorating fast as the United States withdraws its troops by September. 

The Taliban have launched a flurry of offensives, taking districts and border crossings around the country, while peace talks in Qatar's capital have not made substantive progress.

"[The] delegation assured China that they will not allow anyone to use Afghan soil against China," Naeem said.

"China also reiterated its commitment of continuation of their assistance with Afghans and said they will not interfere in Afghanistan's issues but will help to solve the problems and restoration of peace in the country."