BEIJING - The top diplomats from Pakistan and China on Friday took swipes at US President Donald Trump's new Afghanistan policy as they called for new talks with the Taliban to resolve the 16-year conflict.

Chinese Foreign Minister Wang Yi said Beijing stood firmly behind its ironclad friend Pakistan, even though "some countries" did not give Islamabad the credit it deserved in fighting terrorism, a pointed reference to the US.

Foreign Minister Khawaja Asif's first trip abroad to Beijing appeared to highlight how ties between the two all-weather allies have grown even closer while Pakistan's critical relationship with the US is disintegrating amid mutual recriminations and distrust.

Addressing a joint press conference in Beijing, Wang and Asif announced that China, Pakistan and Afghanistan will hold a new series of three-way talks later this year in China to push forward settlement negotiations with the Taliban while the US doubles down on its military campaign.

"It's our firm view that there is no military solution in Afghanistan, the focus should be on a politically negotiated settlement," Asif told reporters. "China is playing a very constructive role in this regard."

Wang and Asif said that Beijing will play a "constructive role" to bring Islamabad and Kabul together. "The participation of China in bringing together and finding a political solution to Afghan problem is very vital. To support the initiative, Pakistan has already undertaken many steps, and will pursue those steps of improving relationship with Kabul," Asif said.

To keep Pakistan and Afghanistan engagement substantive and robust, Asif said Pakistan will take up confidence-building measures and keep engaged with Kabul at all levels including political, military and intelligence.

"We have stakes in Afghanistan's peace and we are already involved in a substantive way, creating atmosphere and culture of peace in the region.

"With China's intervention and its role in bringing together Islamabad and Kabul, we will go a long way and will definitely pursue a policy of engagement with Kabul in bringing peace to our region," Asif said.

"A good relationship will serve both the countries otherwise it will hurt both the countries. So, we sincerely hope that both the countries will work in the same direction and work together for the well-being of Pakistan and Afghanistan and contribute peace in the region," Wang said. The Chinese side welcomes Pakistan's attitude of improving relations with Afghanistan, Wang said. "In addition, we are exploring trilateral cooperation between the three countries. I want to let you know that with the communication between the three parties, there is initial progress in trilateral cooperation," he said.

"We have identified three priority areas which are strategic communication, security dialogue and practical cooperation. On that basis, we will work to advance on trilateral basis starting from easier matters with goal of establishing a new platform for regional cooperation. I am confident that with the consorted efforts from Pakistan and Afghanistan and with the active support from China and relations between the two countries and cooperation among the three countries will embrace a brighter future," Wang said.

Terrorism was a global problem that required concerted efforts. Some countries needed to give Pakistan full credit that it deserved, he said. “Instead of blaming each other, countries need to work with each other,” Wang said.

“Pakistan is a good brother and iron friend of China. No one knows Pakistan and understands Pakistan better than China,” he said. "The govt and people of Pakistan have made huge sacrifices in the fight against terror for everyone to see and the international community should recognise that," Wang said.

Wang reiterated Beijing's continuing and firm support for Pakistan’s fight against menace of terrorism and said both the countries are making joint efforts for peace in the region.

The Chinese foreign Minister said Sino-Pakistan all-weather relationship is strong and unbreakable and added that Beijing will continue to play its role for the progress and development of Pakistan.

Asif thanked his Chinese counterpart for acknowledging Pakistan's sacrifices and providing an unflinching support to Pakistan in its war against terrorism. He also thanked China for its support and affirmed Pakistan's support for the China-Pakistan-Economic Corridor (CPEC), a flagship project of One Belt One Road Initiative announced by Chinese President Xi Jinping.

Islamabad, he said, deeply values Beijing's support for Pakistan's territorial integrity and asserted Pakistan's support for One China policy and China's interests in Taiwan, Xinjiang, Tibet and South China Sea. He also vowed to provide full security to CPEC, adding strict action would be taken against any threat to the project.

Earlier, both foreign ministers held productive discussions with broad consensus on bilateral relations as well as the regional and global situation in the backdrop of emerging challenges.

Wang Yi thanked Khawaja Asif for his visit and reaffirmed China's continuing and firm support to Pakistan and vowed to further strengthen the all-weather strategic cooperative friendship with Pakistan.

He also reiterated Chinese commitment and support to sovereignty and territorial integrity of Pakistan.

Asif highlighted importance of Pakistan-China friendship as well as strategic partnership and economic relations and reiterated Pakistan's support to China on all issues of its core interest.

He said that Pakistan wants peace in Afghanistan and an Afghan-led and Afghan-owned peace process is the only way forward. He however pointed out that Pakistan's security concerns must be addressed and Pakistan sacrifices must be acknowledged.

National Security Adviser Lt Gen (retd) Nasser Janjua, Pakistan Ambassador to China Masood Khalid and senior official of the Ministry of Foreign Affairs were also present.

Foreign Minister Asif Friday evening left for home after a day-long state visit of China. The foreign minister held important meetings with Chinese leaders including Foreign Minister Wang Yi, Head of Commission for Political and Legal Affairs, CPC Central Committee and State Councillor Yang Jiechi.