It was a meeting of friends that stretched late into the evening. Pakistan’s Foreign Minister Shah Mahmood Qureshi and his counterpart, State Councilor and Foreign Minister Wang Yi, talked after sundown in the Diaoyutai state guest house, a complex of several buildings and pavilions, set amid water bodies and acres of greens.

After a lengthy wait, a tiring press corps was finally face-to-face with the two interlocutors. Mr. Wang, the host who had just returned from Europe, spoke first, followed by Mr. Qureshi, whose voice and bearing betrayed the strain of the last one month when India and Pakistan, at one point, stood a whisker away from a devastating war. It was soon evident that among the spectrum of topics that they had addressed, the Pulwama incident had stood out.

On February 14, a suicide bomber killed at least 40 CRPF personnel in Pulwama, Kashmir, triggering a rapid military escalation between India and Pakistan. In the United Nations Security Council, France, Britain and the U.S. moved to designate Masood Azhar, the head of the Jaish-e-Mohammad (JeM), which claimed responsibility for the attack, as an international terrorist.

The Chinese Foreign Minister and his Pakistani counterpart were meeting after Beijing, for the fourth time, effectively blocked Azhar’s designation as a global terrorist. The decision inflamed public opinion in India, but New Delhi, avoiding a harsh response, chose continuity in its engagement with China, which had taken wing last year at Wuhan, where Prime Minister Narendra Modi and Chinese President Xi Jinping met for freewheeling reset talks that lasted for two days. The Wuhan summit had demonstrated that far from the Cold War-era when Beijing had sought India’s containment with Pakistan’s support, Chinese foreign policy had embarked on an entirely new phase of dual engagement. Without losing Pakistan as its core ally, China also wanted to bond with India.

There are compelling strategic reasons for the triangulation of China’s foreign policy towards India and Pakistan. With its room for manoeuvre in the Pacific cramped by the U.S.-dominated first island chain, Chinese strategists have been looking for ingresses in the Indian Ocean, which can help Beijing bypass Washington’s iron grip across the Malacca Straits. For China, Pakistan’s port of Gwadar — the starting point of the China Pakistan Economic Corridor — is a gateway to the Indian Ocean.

The recent downturn in the ties with the U.S. is also reinforcing China-Pakistan bonds. By driving an unrivalled relationship with Islamabad, China hopes to prevent the revival of a once hyperactive relationship between the Central Intelligence Agency (CIA) and the Pakistani security establishment, which could spread subversion in Xinjiang — the gateway of China’s prestige Belt and Road Initiative (BRI) for reviving the ancient Silk route.

Economic factors

The U.S. factor is also a big driver of China’s recent outreach towards India. Officials in Beijing privately acknowledge that preventing India from joining the Indo-Pacific quad, as military partners of the U.S., Japan and Australia, for the containment of China is one of their major foreign policy priorities. There are also compelling economic factors, when Beijing is being forced to look for new markets and supply chains by the so-called trade war with Washington, which is triggering a revamp of India-China ties.

But the Chinese have made it plain that improvement of ties with India cannot come at Pakistan’s cost. In the run-up to discussions on Azhar’s UN designation as an international terrorist, Chinese officials conveyed to their Indian counterparts their fears that in case the head of JeM is proscribed, India will seek labelling of Pakistan as a state sponsor of terrorism, which Beijing roundly rejects. In fact, the Chinese are on record stating that while they are on board in eliminating “breeding grounds of terrorism”, publicly naming and shaming the Pakistani state as a sponsor of terrorism is not part of their playbook.

China has stated its intent to mediate between India and Pakistan after the Pulwama attack. But Beijing, as well as New Delhi and Islamabad, may have to show flexibility and ingenuity before a meaningful convergence can be achieved.

Atul Aneja is The Hindu’s Beijing correspondent