The humiliation of President Joe Biden by a gang of murderous thugs in Afghanistan is just revving up. The latest insult is that the Taliban is refusing to give him any leeway to continue evacuating thousands of Americans and allies.

According to an Aug. 23 report in The New York Times, “Taliban leaders rejected a suggestion from President Biden that American forces might remain past an Aug. 31 deadline to complete the operation, injecting fresh urgency into an already frantic process.”

Imagine that. The most powerful country on earth invests a trillion dollars and thousands of lives over 20 years to replace a terror theocracy, and what does it get in return? Those same terrorists, who lecture our president about deadlines and warn him about consequences.

The real shame is that Biden, in his zeal to “end the war,” never figured out that the hellish part of the war was over and the United States had effectively won.

Our troop presence went from a high of 100,000 to a measly 2,500. After suffering thousands of casualties, the United States did not lose one soldier over the past 18 months. This minimal investment was enough to keep Afghanistan free from the clutches of a terror regime. That’s a victory. But instead of consolidating the gains that required so much hardship and sacrifice, Biden’s botched withdrawal simply squandered them.

Can anyone say with a straight face that it would not be better for the world, for America’s reputation and for millions of terrified Afghanis if we could rewind the clock back a couple weeks, to before the Taliban took over?

The conventional wisdom is that Biden had the right idea to “end the war” but executed it poorly. But that ignores the fact that the United States was no longer in the throes of a war that cost it a fortune in treasure and lives. The surprising development most people overlooked, including former President Donald Trump, is that the U.S. military involvement in Afghanistan had turned into an amazing bargain. For a relatively minuscule investment, it could keep terrorists at bay, maintain a crucial ally and strengthen the free world.

“The fall of Kabul is not an isolated incident,” professor of International Affairs at Georgetown University Paul Miller wrote in The Dispatch. “It is one more step along the road the world has been traveling for the past 20 or 30 years. The war in Afghanistan was a large, long, and expensive effort to push back the boundaries of tyranny, terror, and barbarism; to bring one small, poor country into the fold of the free world and thus to prove the concept that even the worst, poorest, most failed state could find a place here. We failed and the bad guys won.”

We didn’t have to fail. It certainly didn’t help that hardly any media attention was given to the transformation of the so-called “forever war” in Afghanistan. Indeed, after 20 years it had morphed into a smart, sustainable enterprise.

As Miller writes, “There was no persuasive reason to withdraw the few troops remaining from Afghanistan in 2021. U.S. troops prevented the Taliban from overrunning the country and giving safe haven to al-Qaeda. They helped train the Afghan army and keep them in the fight against Americans’ and Afghans’ common enemies… There was no large-scale anti-war movement and no significant domestic political pressure to end our military deployment there. The U.S. military presence in Afghanistan was indefinitely sustainable and strategically vital.”

It’s painful now to look at the chaos unfolding in Kabul—with resurgent violence, attacks on women, stranded Americans fearful for their lives and a revitalized Taliban humiliating the leader of the free world—and see the withdrawal as anything but a strategic and moral blunder. As Miller wrote shortly after the Taliban took over, “The entire world is less safe, less stable, and less free than it was last week.”

Our president snatched defeat from the jaws of victory.

David Suissa is editor-in-chief and publisher of Tribe Media Corp, and “Jewish Journal.” He can be reached at davids@jewishjournal.com.

This article was first published by the Jewish Journal.