If Pakistan is serious about repairing relations with Washington, then the decision by a Pakistani court to release a radical anti-US cleric hardly seems the best way to go about it.
Maulana Sufi Mohammed is one of Pakistan's most controversial religious figures, who amply demonstrated his anti-American credentials by travelling to Afghanistan with thousands of volunteers to help the Taliban in its fight against the US-led coalition.
Sufi Mohammed is the leader of a banned radical group that campaigns for the implementation of Sharia throughout the tribal areas of Pakistan and has a political agenda similar to that of the Muslim Brotherhood.
He is also the father-in-law of Mullah Fazlullah, the head of the Pakistani Taliban who is believed to be in hiding in Afghanistan.
The court's decision to release Sufi Mohammed, on what it says are health grounds, certainly could not be worse timing for Pakistan's government, which already finds itself under intense scrutiny in Washington after US president Donald Trump said he wants to suspend aid to Islamabad.
Mr Trump might have a novel approach to running the White House, as Michael Wolff's controversial new book Fire and Fury has made clear, but one attribute that stands out in a positive way is the sharp business sense he was brought to the administration.
And the president has clearly taken a long hard look at the estimated $35 billion the US has given Pakistan in aid over the past 15 years or so and come to the conclusion that the American people are simply not getting value for money.
The Trump administration’s fundamental complaint is that Pakistan is not doing enough to rein in militant groups like the Taliban, which are hostile to the US and its interests in the region.
This issue is particularly relevant for Mr Trump after he decided in August, despite his original misgivings, to authorise a modest uplift in the US commitment to neighbouring Afghanistan to around 12,000 troops.
Mr Trump, who made it clear during the presidential campaign he was instinctively opposed to America becoming involved in overseas military interventions, was initially opposed to maintaining American involvement in Afghanistan.
He was only persuaded, with some reluctance, to authorise the uplift after his national security team, many of whom have served on the ground in Afghanistan, convinced him that the growing strength of Al Qaeda and the Taliban, as well as the emergence of pockets of ISIL in the east of the country, posed as much of a potential threat to US security as it did the rest of the region.
Mr Trump is not a man who deals in nuance, so the rather ambivalent approach Pakistan has taken to the the Afghan conflict, as well as its complicated relationship with the Taliban, is something that clearly does not appeal to this president.
_______________________
Read more from Opinion
The Syrian regime had options in Deir Ezzor, but it still chose indiscriminate destruction
Mohammed bin Salman proves to be a man of words and deeds
Resolving resolution 242: the UN ruling at the heart of the Arab-Israeli conflict
_______________________
Washington has had a problematic relationship with Islamabad dating back at least to the end of the Soviet occupation of Afghanistan in 1989, when the alliance the CIA had formed with Pakistani-supported militant groups to defeat the Soviets came to an abrupt end.
Indeed, relations at the time of the September 11 attacks in 2001 were so low that the Bush administration threatened to bomb the country back to "the stone age" if it did not cease its support for groups like the Taliban.
Once Washington had decided to invest heavily in a political stabilisation plan for Afghanistan, with around 100,000 US troops being deployed to the country when the mission was at its height, Pakistan’s cooperation was deemed crucial, not least because it provided vital supply lines to the land-locked country.
For this reason a generation of Washington diplomats and military officers have been required to turn a blind eye to Islamabad's double-dealing, where its official position is that it supports the US-led effort to support the Afghan security forces, but unofficially continues to maintain links with long-standing allies like the Taliban and the Haqqani network. Many followers of Osama bin Laden, who was killed in a safehouse located just a mile away from a major Pakistani military base, are also believed to still be hiding in the country.
The inconsistencies in Pakistan’s position have now been exposed by the more rigorous approach Mr Trump has taken as he tries to resolve the Afghan issue once and for all. And it means that Pakistan now has to decide whether it wants to maintain the long-standing relationship it has enjoyed with Washington, or to establish a new set of alliances, with China being mooted as a possible alternative.
China has invested $62 billion in Pakistani infrastructure under the China-Pakistan Economic Corridor and, given China's rivalry with India, Islamabad might think its long-term strategic interests are served by cosying up to Beijing, rather than Washington.
But this would be a grave error of misjudgement. Chinese foreign policy is self-centred, focused entirely on what is good for China, and rarely takes the interests of allies into consideration. The US, on the other hand, sees the bigger picture, and has already intervened in the past to prevent all-out war between India and Pakistan.
So if Pakistan wants to guarantee its long-term survival, it should understand that maintaining ties with Washington is a far better bet than tilting towards Beijing.
Con Coughlin is the Daily Telegraph’s Defence and Foreign Affairs Editor