While Americans were preparing to celebrate Thanksgiving, President Trump was engaged in a dialogue with Pakistan Prime Minister Imran Khan that was anything but celebratory. Afterward, Trump declared that Pakistan has “done nothing for the United States” despite receiving some $20 billion in U.S. assistance since 9/11.

Khan pushed back, using his American counterpart’s familiar defiant tone as well as Trump’s favorite mode of communication. “Trump’s false assertions add insult to the injury Pakistan has suffered in the US war on terror in terms of lives lost and economic costs,” Khan tweeted. “He needs to be informed about historical facts. Pakistan has suffered enough fighting [America’s] war. Now we will do what is best for our people and our interests."

In this exchange, the facts are on Trump’s side.

The attacks against America on Sept. 11, 2001 were planned in Afghanistan by terrorists who not only lived in that nation without fear of interdiction, but who essentially controlled its central government. The Taliban and al-Qaeda were able to work their evil in large part because of support from neighboring Pakistan -- especially its intelligence service, ISI.

What President Trump is saying is that Pakistan takes U.S. money notwithstanding its indifference for promoting American goals or values. And when ISI is involved, it’s even worse than that: The Pakistani spy service often works actively working against U.S. interests.

Here’s a recent case in point: Two weeks ago, Salauddin Khostwal received multiple visitors at his family residence in a village outside Akora Khattak to celebrate his release from ISI detention. Salauddin is a close confidant of Seraj Haqqani and, until his detention by the Pakistan Intelligence Service in Peshawar, he was leader and person in charge of the Haqqani Network suicide bomb operations. He has been second only to Anas Haqqani on Seraj’s list of priority people to have released.

The ISI detained Salauddin two years ago and refused Seraj Haqqani’s requests to release him. I suspect that the ISI detained Salauddin on suspicion of having assisted Tehrik-i-Taliban suicide operations. Salauddin is suspected of being responsible for the masterminding of multiple high-casualty attacks in Kabul including the 2015 attack on Afghanistan’s Parliament.

The explanation that Salauddin’s family and the Haqqani Network comrades gave for his release was that it was in response to a demand by Seraj Haqqani of U.S. Ambassador Zalmay Khalilzad or the Taliban team meeting with him. The Taliban presented the proposal to Khalilzad as a confidence-building measure, and demanded that he intercede with the Pakistani authorities.

It comes in the wake of three other releases of Taliban prisoners. Salauddin is the first at the behest of Seraj Haqqani. He’s also the first released detainee who is unambiguously a terrorist.

Predictably, perhaps, a suicide bomber killed 55 people and injured nearly 100 at a gathering of Sunni scholars in a Kabul hotel last week as they celebrated the Prophet Mohammed’s birthday. Two days later, a bomb detonated during Friday prayers in a mosque attended by Afghanistan Army troops in Khost province. Three U.S. servicemen were killed by a roadside bomb earlier this week; on Wednesday, a truck bomb killed 10 outside a British compound on the outskirts of Kabul.

Ambassador Khalilzad has been given the Herculean task of bringing peace to a violence-ravaged nation. He has gone out of his way to show respect to the Pakistanis while seeking their cooperation in ending the bloodshed. Yet in the name of promoting trust, ISI has unconditionally released the mastermind of the Haqqani Network’s suicide bomb program. Who does ISI think its kidding? If Pakistan wants to be taken seriously, it should use its influence over the Taliban to halt the bombings and encourage a cease-fire. Donald’s Trump challenge to Imran Khan was on the mark. Sadly, our “ally” government in Pakistan speaks out one side of its mouth while extending a hand to the very people that seek to terrorize and destabilize the effort to bring peace to Afghanistan.

There is no magic bullet to fix this mess. But at least we finally have a president willing to ask hard questions, demand answers that make sense, and relentlessly press the lumbering bureaucracies in the intelligence and military community for new ideas and truthful answers. The man insists on results, which is a hallmark of effective leaders.

In the early 1980s, when I began my CIA career, I witnessed a moment of clarity in executive leadership when agency director William Casey, furious with the lack of progress on the ground in a complex aspect of the Cold War strategy, chewed out his deputy director for operations. “You people aren’t cutting it,” Casey said. “You only seem to do your best work when my foot is on your neck.”

Mr. President, please put your foot on their collective necks, and demand excellence. The frustration that I, and many of my professional colleagues, feel is we know what the CIA and other U.S. agencies are capable of achieving when they are well-led and empowered in the field. We can and must do better. If the senior leadership of the bureaucracies is not producing, fire and replace senior officers across the spectrum. A state of strategic equilibrium and power balance can be achieved in Afghanistan, and it can be reached before the 2020 election. We have wasted enough time.