Afghan President Mohammad Ashraf Ghani

A peace envoy from Afghanistan met in western China last week with former Taliban officials with close ties to Pakistan’s intelligence agency, in an attempt to keep open the possibility of formal Afghan peace talks, officials said Monday.

The meeting, hosted by China and, in part, organized by Pakistani officials, took place Wednesday and Thursday in Urumqi, capital of the western region of Xinjiang, which has mountainous borders with Afghanistan and Pakistan and is home to many Muslims.

The main representative of the Afghan government was Mohammad Masoom Stanekzai, who was, at the time, a crucial member of the country’s Peace Council, the group charged with exploring talks with the insurgency, and since then has been nominated by President Ashraf Ghani as defense minister. On the other side of the table were three figures from the old Taliban government in Afghanistan, according to current and former officials with knowledge of the discussions who agreed to speak on the condition of anonymity because of diplomatic sensitivities.

“The meeting resulted from cooperation of the Pakistan and Afghan governments with the support of China,” said Barnett Rubin, a veteran scholar of Afghanistan who has worked in the United States government on Afghanistan policy.

The fact that China agreed to host the talks was the latest sign that Beijing is encouraging peace efforts and an end to Afghanistan’s 13-year civil war. In late 2014, two Afghan Taliban officials came to Beijing with Pakistani officials to discuss peace moves.

The Taliban members came to Urumqi to reiterate familiar positions, and the representatives of the Afghan government said it was ready to make a strong effort to build trust if the Taliban agreed to peace negotiations, a senior Afghan official said, according to the New York Times.