The dialogue took place ahead of the seventh round of talks between the Taliban and the United States in Doha.

China on Thursday confirmed that it had hosted Taliban leader Mullah Abdul Ghani Baradar — the group’s deputy chief on political affairs — as part of its bid to expand its role in Afghanistan, which is set for another major transition.

In response to a question, foreign ministry spokesperson Lu Kang said that Chinese officials exchanged views with Mr. Baradar and his aides on “peace and reconciliation process as well as the fight against terrorism”.

The dialogue took place ahead of the seventh round of talks between the Taliban and the United States in Doha, Qatar.

Analysts point out that the “peace and reconciliation” process would conclude once the Afghan government and the Taliban agree on a power-sharing formula.

China has stepped up its engagement with Afghanistan, apprehending that the proposed U.S. military withdrawal from Afghanistan can result in a power vacuum, which can trigger an outflow of militants belonging to the East Turkestan Islamic Movement (ETIM), destabilising the neghbouring Xinjiang region.

Mr. Lu stressed that China was focusing on promoting an internal dialogue between the Taliban and the Afghan government led by the President Ashraf Ghani.

“We always support Afghan-led, Afghan-owned extensive and inclusive peace and reconciliation as well as the internal dialogue among the Afghanis,” Mr. Lu said.

“So we have made our position clear with Mr. Baradar. This is also an important part in our efforts to promote peace talks,” he noted. “Both sides agree this exchange is mutually beneficial and we also agree to seek communication and cooperation on the political settlement of the Afghan issue. We will try to talk though various means and ways to play our due role in realising our due role peace and reconciliation, stability and development of Afghanistan.”

Mr. Lu pointed out that both the opposition and the Afghan government appeared ready to resolve their differences. “I believe relevant parties in Afghanistan who are committed to peace talks hope to resolve the internal situation in Afghanistan and achieve sustainable peace and reconciliation there so that we can work to insure that final peace and reconciliation.”

He acknowledged that China was trying to promote a dialogue among Afghan groups. “Another important issue is about the joint fight against terrorism,” he said.

China’s active diplomacy on Afghanistan was also visible at the United Nations headquarters in New York. State-run Xinhua news agency is quoting Ma Zhaoxu, China's permanent representative to the United Nations, as saying on Wednesday that the international community must help boost Afghanistan's capacity for combating terrorism and maintaining stability.

He expressed the hope that the United Nations Assistance Mission in Afghanistan (UNAMA) will continue to help the country strengthen capacity building in the field of security.

“The international community should strengthen coordination and cooperation to support Afghanistan in its counter-terrorism efforts to effectively respond to terrorism, transnational crime, and drug trafficking, among other threats,” Mr. Ma told a Security Council meeting on Afghanistan.

He also urged the international community to help improve the humanitarian situation in Afghanistan, addressing problems resulting from natural disasters, as well as creating conditions for the return of refugees from neighbouring countries. .

In the past, China has held talks with Taliban. In mid-July 2015, an Afghan Taliban delegation led by Sher Mohammad Abbas Stanikzai from the Qatar office had held back channel talks in China, prompting the Chinese foreign ministry to say that it maintained contact with all parties engaged in Afghan peace talks.

In the same year, the Taliban and the Afghan government representatives reportedly met in Urumqi, capital of China’s Xinjiang Province.

Observers point out that China needs a peaceful Afghanistan to draw Kabul firmly in its Belt and Road Initiative (BRI) as South Asia’s gateway into Central Asia. The Chinese foreign ministry had said that the China Pakistan Economic Corridor (CPEC) has been extended to Afghanistan.

Afghanistan has also been a source of Chinese investments especially in the raw materials sector.