At the lowest ebb of the last annus horribilis for US-Pakistan ties in 2011, soon after the special forces raid that killed Osama bin Laden in Abbottabad, Pakistan brandished the China card: if relations with Washington were going into a tailspin, Islamabad would turn to Beijing instead. They were rebuffed. China discreetly made it clear to both the United States and Pakistan that the “all-weather friendship” was already as deep as they wanted it to be and that Islamabad needed to focus on fixing its relations with Washington.

With President Donald Trump’s announcement that the new US South Asia strategy will involve tightening the screws on Pakistan if it doesn’t address militant safe havens within its borders, the early indications are that the China card will be played again. This time, however, Pakistan may have more luck. The relationship with Beijing is in a very different place now and while China will take its usual care not to get caught in the middle, it is likely to provide a stronger backdrop of support than it did the last time US-Pakistan tensions escalated.

What China has to fear from US drones in Trump’s Afghan search

Some things haven’t changed. While it might seem that Beijing would see any deterioration of Islamabad’s ties with Washington as an opportunity to exploit, China has long perceived greater advantage in a robust US-Pakistan relationship. Given Pakistan’s most important role for China has been as a counterbalance to India, it wants Islamabad to benefit from solid US economic and military support. Healthy ties with Washington are seen by Beijing to place implicit limits on the scope of US-India relations. They also ensure that Pakistan doesn’t turn into yet another point of tension in US-China relations or act as an impediment to Sino-Pakistani security ties.

China should be positively disposed towards elements of the new US strategy in Afghanistan too. Beijing will have been relieved that there is no precipitate military pull-out. Its concerns about an open-ended US troop presence will be mitigated by the fact the US has kept reconciliation with the Taliban alive as the political end goal, which China shares. Beijing also wants to see a stable settlement in place to ensure that Afghanistan cannot become a safe haven for Uygur militant groups or a threat to its growing strategic interests in the region.

My brother, the ‘Osama bin Laden of Southeast Asia’

In principle, then, there is still a basis for continued US-China cooperation on Afghanistan, and Beijing’s first instinct will almost certainly be to see if there is scope to square the circle between US and Pakistani interests rather than risking a slide into mutual antipathy. An agreed path towards peace talks with the Taliban will probably continue to be China’s main focus, even if the near-term prospects of negotiations remain poor. But if the needle proves impossible to thread, it is clear that Beijing’s interests in Pakistan have shifted markedly in recent years, and Beijing cannot be expected to react the same way that it did in the Abbottabad aftermath.

The most tangible manifestation of the shift is the China-Pakistan Economic Corridor (CPEC), which Chinese officials have described as the flagship for President Xi Jinping’s Belt and Road initiative.

In addition to the fact that China’s once negligible economic interests in Pakistan have grown to the tune of tens of billions of dollars in investment, there is a political premium to making CPEC a success.

CPEC is also bound up in a deeper Chinese strategic commitment to Pakistan. As the People’s Liberation Army looks to expand its global power projection capabilities, it is strengthening ties with partners in areas ranging from naval cooperation to counterterrorism. In the last two years, the security relationship with Pakistani has been held up as a model to follow in this regard.

Is China turning up heat on India through Pakistan flank amid Doklam stand-off?

Demonstrating that China can stick by its closest military and intelligence partner during trying times is a credibility issue that now extends well beyond any bilateral interests.

Beijing is also keener to ensure that Pakistan takes no risks with its internal security, lest it pose risks to Chinese assets and personnel, and is sympathetic to Pakistani warnings of blowback if it is expected to move quickly against militant groups operating from its territory. In addition, Beijing is likely to view with suspicion any US moves to expand the scope of drone strikes beyond the tribal areas. While the US would say that any strikes on militant safe havens have nothing to do with China, Beijing, with its wary eye on the deepening US-India strategic relationship, may not be persuaded.

As a result, if Pakistan comes under real pressure, China will probably be willing to extend forms of economic support and political protection it would previously have balked at. A version of this already played out in 2015, when Pakistan was being pushed by the Saudis and the UAE to play a significant role in the military campaign in Yemen. Chinese economic reassurances helped Pakistan to resist the entreaties and financial threats. China has also given stronger political cover to Pakistan in international forums.

Imagine what China and India can do together

In many ways, though, the question is less what new steps Beijing might take and more whether China’s existing backing leaves Pakistan in a position where it thinks it can hold out without changing its approach to Afghanistan. Pakistan has no interest in casting its lot in entirely with China, and Beijing doesn’t want that either. China has its questions about Pakistan’s use of militant proxies in the region too. But the two sides have become more deeply enmeshed. And while CPEC might help to shift Pakistan’s security calculus in a benign direction over the longer term, in the short term, it is likely to give Pakistan additional breathing space if it decides to face the US down.

Andrew Small is the author of The China-Pakistan Axis: Asia’s New Geopolitics