As the Taliban makes rapid gains across Afghanistan in the wake of the American military withdrawal amidst fears of a "high-speed Saigon" evacuation, there are several key differences between Afghanistan and Vietnam.

For one, South Vietnam did not countenance democratic elections. By contrast, the Afghan government, and not the Taliban, welcomes elections as a means of cementing its legitimacy.

Whereas the Vietnamese nationalists were fighting to unify Vietnam, the Taliban are essentially, argues Afghanistan’s First Deputy President Amrullah Saleh, fighting "to divide Afghanistan. While the Viet Cong were popular, the Taliban was never popular." And, he points out, while the North Vietnamese were left with little option but to fight for their liberation, "the Taliban are fearful that they will fade away without fighting."

But there are similarities in the American approach to their allies in both instances. These undermine Washington’s moral authority.

In both instances, the U.S. negotiated a separate peace with their enemy without the inclusion of their erstwhile ally. This left Saigon and, now, Kabul fighting that enemy. The timing of this peace was badly off: rather than negotiate with the Taliban when it was weak, it did so when it was resurgent.

At its core, the international community failed, until very late in the day, to understand the political character of Afghanistan’s conflict. The mood of vengeance in the U.S. after 9/11 meant it was in no mind to make peace with the Taliban, and bring about an inclusive settlement.

Rufus Phillips, a Vietnam hand, described the difference between American views and local aspirations as a ‘fog of incomprehension’ The same chasm of misunderstanding applies to Afghanistan, not least in identifying a political cause other than the removal of the Taliban that the Afghans could agree on and Americans believed were worth fighting for.

There is a critical human dimension to both wars. In Afghanistan, outsiders have generally failed to grasp the Afghan ability to cut deals in ways that allow them to compete for power and co-operate to make money at the same time.

These failures reflected a lack of understanding of the Taliban and of Afghanistan per se coupled with a tendency to caricature, and a consequence of poor planning and limited patience. ‘I felt like we were high-school students who had wandered into a Mafia-owned bar,’ said General Stanley McChrystal on his arrival in Afghanistan in 2002. It was stated policy that Washington didn’t do nation-building. As a result, it was all, initially, about bear hunting, at least until the West realized that they could not safeguard their interests without securing a friendly government in Kabul.

Just as the US failed to build a nation in South Vietnam, with a cause equal to that of the North, it has failed to do so in Afghanistan. Its solutions, strategy and tactics have not worked well enough. The Taliban calculus could have changed if the West had signaled it was there for the long haul, like Korea. They were more likely to commit to a political solution if faced with the prospect of a long-term military stalemate instead of using it as a ruse to buy time

The West also failed to appreciate the extent to which Afghanistan’s politics were personal and tribal rather than national, and the degree to which regional influences matter. This should not downplay Afghans’ own role in their misfortune, or Washington’s preference to ignore the obvious political frailties as it sought to paper together a cohesive Afghan system without a peace settlement.

The final Vietnam echo is in the method and consequences of U.S. withdrawal. If it wanted to leave, that choice would have had to begrudgingly be accepted by the Afghan government, but not the manner of its departure. The West’s attempts to escape its moral obligation to the people of Afghanistan will have consequences, not least in the value of its promises, and certainly not least to the millions of women now at the mercy of the Taliban’s theocracy.

This impact on Western authority is compounded by history. Islam was instrumentalized and weaponized by the U.S. to help to bring down the Soviet Union in Afghanistan in the 1980s.

As in Vietnam, the U.S. negotiated to enable retreat, not victory.

In both Vietnam and Afghanistan, a failure to understand their allies and the enemy and the character of the conflict took Washington down the wrong road. In both, it fundamentally got the politics wrong.

Like South Vietnam, it’s now up to Kabul to manage the mess, pain and uncertainty of the Western withdrawal. While there was a Western-centric environment for 20 years, from the pursuit of strategic issues including diplomacy to a tactical approach that involved spreading out Western bases and a dependency on airpower, Kabul is now, quickly, going to have to make another plan.

Here there remains one big, possible difference. Should Kabul now take the fight successfully to the Taliban, which will be necessary for a ceasefire and a negotiated settlement, Afghanistan will be no South Vietnam.

Dr. Greg Mills served four assignments with the International Security Assistance Force in Kabul and Kandahar, and heads the Johannesburg-based Brenthurst Foundation