Pakistan finds itself in the middle of the 21st century's defining geopolitical war, and the strategic implications for Islamabad are huge.
The recent deadly clash between Chinese and Indian forces in the Ladakh region of Kashmir heralds the biggest shift in South Asia's strategic balance since the September 11 terrorist attacks by Al Qaeda.
Since 2001, the US military presence in Afghanistan has overshadowed all other geopolitical interests in the region.
In 2002 and 2008, it ensured that India and Pakistan did not go to war over cross border terrorist attacks.
On both occasions, escalations were prevented by big-power diplomacy whereby the US and China worked together to prevent tensions from boiling over - having previously interceded to bring an end to the Kargil War in 1999.
Since President Donald Trump decided last year that the time had come to withdraw the US military from Afghanistan, geopolitical competition between the region's indigenous powers has spiralled - and Washington has done its best to fan the fire sparked by its pullout.
Despite making placating noises to Pakistan, the US was clearly at ease with Narendra Modi's ground shaking move to absorb Kashmir into the Indian Union last August.
By emboldening Modi, it helped set into motion a historic escalation with China, the third - and hitherto low profile - claimant in the Kashmir dispute, culminating in the Ladakh escalation.
From obscurity, Kashmir is now being viewed as the latest - and potentially most dangerous - hotspot in the so-called new Cold War between China and a US-led alignment of the West and Indo-Pacific nations who most feel threatened by Beijing.
The implications for Pakistan's strategic calculus are huge. Kashmir is the cornerstone of its foreign policy, and the one issue on which all the pillars of the state and the public are in consensus.
Since the 1962 border war between China and India, Kashmir has been defined as the basis of the India-Pakistan enmity. The China-India rivalry was another issue, until now.
Pakistan's decision makers are now counting the costs of having asked China last October to take the lead role in diplomacy on Kashmir.
The first victim of this friendly fire is Pakistan's diplomatic response to India's move to annex Kashmir.
It is built upon highlighting the brutality of the lockdown subsequently enforced in Kashmir by India.
Fleetingly, state atrocities against Kashmiris and subsequent communal attacks against Indian Muslims caught the attention of the world media, and politicians in key partner states began to ask whether they really wanted to pursue a strategic partnership with an overtly fascist government in New Delhi.
For Pakistan, the unprecedented international focus on the human rights situation in Kashmir represented a morale boosting moral victory.
For decision makers in Islamabad, it also helped to conceal the ugly stain left by their failure - however sensible in the circumstances - to react decisively on Kashmir when India's push turned into a shove.
In the circumstances, it is hardly surprising that Pakistan's response to events in Ladakh has been ambivalent.
There is a limited sense of relief that China has replaced India as the big-stack bully in Kashmir. By redirecting India's military focus northward to Ladakh, China has in all probability staved off any threat of an Indian attack against Pakistan, because it raises the prospect of an unwinnable two-front conflict.
Yet, Pakistan's government is reluctant to publicly acknowledge that breathing space because it runs counter to its assessment that the Modi administration is planning another adventure across the Line of Control.
It cites the rising intensity of skirmishes along the de facto border in Kashmir, which have shown no signs whatsoever of relenting since India sent warplanes across it in February 2019 - whipping up the Hindutva nationalist frenzy that secured Modi re-election shortly after.
Islamabad argues that India's setback in Ladakh actually increases the temptation for Modi to launch a face-saving operation against Pakistan.
Pakistan's other major concern is the potential blowback that the China-India escalation has for its relations with the US.
Islamabad has worked hard over the last 18 months or so to patch up its ties with Washington, as evidenced by the key enabling role it played in the US-Taliban peace deal signed in February.
The hope was that the US would lift the intense pressure it had exerted, through forums like the terrorist funding watchdog Financial Action Task Force, on Pakistan's imploding economy.
Islamabad's decision makers seemed to think that playing fairy godmother for Trump in Afghanistan would secure Pakistan's embattled western front and persuade him to lean on Modi to back down in Kashmir.
Instead, Pakistan finds itself smack in the middle of the 21st century's defining geopolitical war, between its most important frenemy and closest ally, and it is losing leverage, not gaining it.
This week, US special representative on Afghanistan Zalmay Khalilzad is visiting Islamabad and Tashkent. For the first time, he will be accompanied by the head of the US International Development Finance Corp - Washington's answer to China's Belt and Road Initiative, of which Pakistan is the biggest beneficiary.
The visit comes shortly after the US embarrassed Pakistan with another public report highlighting the issue of crossborder terrorism.
It is a carrot with a very large stick that Pakistan, since handing China the baton on Kashmir last October, has pushed back forcefully, both in terms of rhetoric and action.
It has just signed contracts with Chinese state owned enterprises to develop three major hydropower projects on the Jhelum River, which acts as the Line of Control in western Kashmir.
The contracts also represent a reassertion of Pakistan's rights under the 1960 Indus Water Treaty, a World Bank mediated treaty, which is showing signs of falling apart.
As the new Cold War escalates, Washington will publicly revive its concerns about Pakistan's development of short range nuclear weapons - often misrepresented as tactical weapons because it implies a heightened risk of rapid deployment and escalation.
Islamabad has helped to fuel that narrative by playing up the threat of a nuclear response to a conventional India attack, as part of its diplomatic response to Modi's aggression.
But it's complaints about India's development of a second-strike capability will fall deaf on ears attuned to China's recent deployment of the same capability.
Earlier this week, I heard distinguished Pakistani thinkers - all of them participants in so-called Track II diplomacy - discuss the ramifications.
Their bottom line: The Pakistani state is cognisant of the challenges it faces, but it is nowhere close to coming up with a policy to meet them.
Disclaimer: The viewpoints expressed by the authors do not necessarily reflect the opinions, viewpoints and editorial policies of TRT World.
We welcome all pitches and submissions to TRT World Opinion – please send them via email, to firstname.lastname@example.org