China, which shares a western border with ​both nations, has been trying to mediate between ​the allies turned foes, holding telephone calls with ⁠their foreign ministers and sending a special envoy ​on visits in March.

"Both Pakistan and Afghanistan attach importance ​to, and welcome, China's mediation, and are willing to sit down for talks again, which is a positive development," foreign ministry ​spokesperson Mao Ning told a daily press conference.

The fighting ​between Pakistan and Afghanistan that started in October ​has ⁠killed scores of people on both sides, with Afghans taking the brunt.

Islamabad accuses the Afghan Taliban of harbouring ⁠Islamist militants ​who launch attacks in Pakistan, ​although Kabul denies this calling the militancy its neighbour's domestic problem.