China has praised Pakistan's "restraint" and willingness to talk with India to ease tensions between the two countries after a deadly bombing in Indian-controlled Kashmir last month.
Pakistan is facing pressure from global powers to act against groups carrying out attacks in India. 14 attack that killed at least 40 paramilitary police.
The incident led to the most serious conflict in years between the nuclear-armed neighbours, with cross-border air strikes and a dogfight over the skies of Kashmir.
The crisis eased after Pakistan returned a downed Indian pilot on Friday.
Visiting Pakistan on Wednesday, Chinese Vice Foreign Minister Kong Xuanyou said Beijing and Islamabad were "all weather" strategic partners and that they always supported each other, China's Foreign Ministry said in a statement on Thursday.
"China has paid close attention to the present situation between Pakistan and India, and appreciates Pakistan's remaining calm and exercising restraint from the beginning, and persisting in pushing to lower the temperature with India via dialogue," the ministry paraphrased Kong as saying.
China maintains that the sovereignty and territorial integrity of all countries should be respected and does not want to see "acts that violate the norms of international relations", Kong added.
"China calls on Pakistan and India to refrain from taking actions that aggravate the situation, show goodwill and flexibility, launch dialogue as soon as possible, and work together to maintain regional peace and stability," he said.
China is willing to continue to play a constructive role in this regard, Kong added.
The ministry said Kong had met Prime Minister Imran Khan, army chief General Qamar Javed Bajwa and Foreign Minister Shah Mehmood Qureshi.