On Monday, Oct. 21 the top American commander in Afghanistan, Army General Austin S. Miller, announced at a news conference in Kabul that 2,000 U.S. troops had been withdrawn from the country over the last year. Some 12,000 to 13,000 remain of a force that numbered more than 100,000 in 2011.

By all accounts, the Trump administration is now fully committed to withdrawing U.S. forces from that war-ravaged nation, with or without an agreement with the Taliban. American and Afghan officials, speaking on the condition of anonymity to New York Times reporters, have indicated that current plans call for further withdrawals down to 8,600 troops. Only the details and the timing remain to be worked out.

The American withdrawal bodes ill for the survival of the perennially corrupt and ineffective Kabul government that the United States, with some help from NATO, has attempted to construct and support over the last 18 years.

As the war entered its 19 th year this month, Kabul’s regular forces rarely leave their static defensive positions in pursuit of the bad guys. And when they do, they are usually soundly defeated. “The weight of the Afghan War [now] is mostly on the shoulders of the commandos and the air force,” said Gharzai Khowakhozhai, a former Afghan army general, recently. “Regular forces are not doing their job properly.”

In August, Dan Coats, then-director of U.S. national intelligence, told Congress that “Afghan security suffers from a large number of forces being tied down in defensive missions, mobility shortfalls, and a lack of reliable forces to hold recaptured territory.”

One would be hard-pressed to find anyone with serious military credentials to take issue with these sobering assessments. It’s now next to impossible to imagine that Trump, or one of his Democratic rivals for the presidency in 2020, would re-deploy American troops there if things go from bad to worse, for a simple reason: A broad consensus had emerged among policymakers, academic specialists, and military analysts that the war has already been lost. Talk about progress in this conflict now sounds almost hopelessly naïve, unless you’re talking about the Taliban and its allies.

Stephen M. Walt, a leading U.S. foreign policy scholar at Harvard, put it this way in a recent article in Foreign Policy: “We can palaver about peace terms, residual forces, the implications for the upcoming Afghan elections, et cetera, as long as we want, but the cold, hard reality is that the United States has lost the war in Afghanistan. All we are debating—whether in talks with the Taliban or in op-ed pages back home—is the size and shape of the fig leaf designed to conceal a major strategic failure after eighteen years of war, thousands of lives lost, and hundreds of billions of dollars squandered.”

Pundits have been comparing the war in Afghanistan to Vietnam for years now, but the comparison has never been more apt than it is today. Both countries, writes historian George Herring, have long been “‘graveyards of empires,’ fiercely resistant to the will of even the most powerful outsider,” and “both wars were offshoots of larger global conflicts.” Vietnam was a part of the Cold War, while the conflict in Afghanistan has been a part of the Global War on Terror.

“ In neither war did American policymakers possess even a basic understanding of the societies and cultures they were trying to transform. ”

Both conflicts were “people’s wars,” in which the United States committed itself to establishing independent, pro-democratic governments as a bulwark against our adversaries.

In neither war did American policymakers possess even a basic understanding of the societies and cultures they were trying to transform.

The insurgencies the United States aimed to defeat in Vietnam and Afghanistan were better organized and more highly motivated than our local allies. The communists in Vietnam pursued a protracted war policy, in which they suffered hundreds of tactical defeats on the battlefield as they waited for the United States to lose its will to continue. The strategy worked.

The Taliban and its allies have pursued a similar strategy of waiting the United States out. It’s now on the verge of success.

In the early years of America’s war in Vietnam, the Johnson administration continually put a positive spin on developments, emphasizing U.S. forces’ ability to inflict staggering punishment on the enemy in combat, but failing to admit what the most perceptive officials and officers on the ground knew very well: that the Vietcong were winning the political war for control of the villages and the people in them.

In November 1967, two and a half years after Americans took over the war, General William Westmoreland told the American people that the enemy was “on the ropes,” and close to defeat. Two months later, 80,000 communist troops struck more than 100 cities, towns, and installations in the massive Tet Offensive, exposing the delusions behind the official assessments of progress.

In Afghanistan, Secretary of Defense Donald Rumsfeld declared an end of “major combat” on May 1, 2003. Six years later, the Obama administration had to deploy 30,000 additional American troops in a hurry to prevent the Taliban from regaining control over vast swathes of territory previously held by government forces.

In 2004, the Taliban forces numbered about 9,500 men. By 2011, the number had risen to 25,000, yet in between those years, the Bush and Obama administrations, as well as various American military commanders, spoke optimistically about a counterinsurgency and nation-building program that was, in reality, going nowhere.

Training an indigenous armed force to defeat its own enemies was a major mission of the U.S. military in both conflicts. Army and Marine advisers trained the South Vietnamese armed forces from the mid-'50s until the early '70s, yet with a few exceptions—the South Vietnamese Marines and Rangers come to mind—the South Vietnamese army remained poorly led and crippled by high desertion rates and sagging morale.

Much the same can be said about the armed forces under Kabul’s command today.

“ Perhaps the most troubling similarity between the two wars lies in the spectacular failures of the American-devised nation-building programs. ”

No serious observer of Afghan security forces of whom I’m aware today believes Kabul’s forces will be able to stand up to its enemies without significant help from the American military, particularly American air power. Time after time, Taliban fighters have been able to dislodge Afghan defenders from their defensive positions and assert, or re-assert, control over the local population.

Perhaps the most troubling similarity between the two wars lies in the spectacular failures of the American-devised nation-building programs. In both nations the United States military, USAID, and the State Department, along with a host of NGOs, went to work to construct a central government responsive to the rural population’s needs, improve the primitive communications and transport infrastructure, and build a more productive economy. Billions were spent each year in what amounted to massive social engineering projects. Yet in Afghanistan as in South Vietnam, the national government remained hopelessly corrupt and incompetent, as well as completely dependent on American largesse.

As Tim Bird and Alex Marshall note in Afghanistan: How the West Lost Its Way, their excellent history of the Afghan War, Hamid Karzai, the first president of the “new” Afghanistan,

had to choose between constructing a merit-based government that would promote solely on ability and include a high proportion of Afghan technocrats returned from abroad, and trying to use the government apparatus as a way of keeping the disparate and potentially violent political factions in balance. Inevitably he erred toward the latter… The result was that the heads of ministries used their portfolios to provide opportunities for their supporters and to enhance their personal positions.

The arrogant assumption behind the American-driven nation-building program in Vietnam was that both the political class and the indigenous population were sure to gravitate toward a pro-American administration that embraced the ideals of rule of law and representative government. Policymakers were so ignorant of the history of Vietnam that they failed to see that any government in Saigon dependent on a foreign power was bound to be viewed with deep suspicion and mistrust by its people—particularly when the leaders of the Saigon regime were themselves closely affiliated with Vietnam’s erstwhile conquerors, the French. Besides, the Saigon regime supported by the Americans displayed very little interest in bettering the lot of the average Vietnamese peasant.

And finally, in Vietnam, the United States left its allies to certain defeat, having claimed to have achieved “peace with honor.” Who can doubt that Washington will be making the same claim soon about Afghanistan, and that—as in Vietnam—it will be a bold-face lie?

Ten years ago, Maj. General Fred Haynes, a Marine veteran of World War II and the Vietnam war, shook his head and told me point-blank, “We ’re never going to win this thing in Afghanistan. Thirty-seven years in the Marine Corps taught me a few things about the United States. We are very good at blowing things up, but we ought to get the hell out of the nation-building business, because we don’t know what we are doing.”

How right the general was!