Afghanistan has lived up to its reputation as the graveyard of empires.

America has lost its second war.

Is the potential impending withdrawal from Afghanistan worth it? Is it a good idea?

If we leave now, we will have gained nothing — nothing — from our long occupation. The idea that we can make a meaningful deal with the Taliban is as absurd as it is immoral. Do we really trust a fundamentalist warlord government with a history of brutality and assassinations to keep its pinky promises? What in our long history of war in Afghanistan should convince us that the Taliban will not wage war against the government we have put in place, and that it won’t win? What will happen to the women we leave at their mercy; do we expect the Taliban to give them rights because now that they’ve fought us off they’ve seen the error of their ways?

If we back out now, we have wasted years fighting the longest war in our history — and it is absolutely immoral to leave people at the Taliban’s mercy. Does that mean it’s worth staying another 18 years, potentially without ever making anything better than it is now?

That’s too enormous a moral calculus. I can’t honestly make it.

But it’s worth noting that our failure isn’t really a conventional military one; given billions of dollars and unlimited power, we failed to create a government that much of the population prefers to a group of medieval fundamentalists.

We are terrible — terrible — at nation-building. And this is a recurring problem.

Our withdrawal from Afghanistan is shaping up to be an almost shot-for-shot remake of our failure in South Vietnam, where we propped up a government that had less legitimacy to local people than a violent communist dictatorship. We spent much of the ‘80s overthrowing democratically elected governments in Latin America and setting up brutal strongmen in their place, some of whom we later had to fight. We supported the government of Saddam Hussein in Iraq. When the Soviet Union fell, we had a rare opportunity to help Russia establish a meaningful civil society governed by the rule of law. We failed.

The government we set up after we invaded Iraq for the second time has become such a chaotic mass of sectarian hatreds that the Islamic State emerged as a response. And it would have fallen to IS if not for our re-commitment of forces to the region. And, of course, the government we set up in Afghanistan has, after almost 20 years, neither become legitimate, nor powerful, nor made the lives of the people living under it significantly better.

And in every case — every single case — our failure to nation build, to create a legitimate, prosperous and stable society, later came back to bite us where it hurt.

How many times does this have to happen before we realize that nation-building is something we need to get good at? That it may, in fact, be one of the key long-term tactics of modern warfare?

And that if we can’t do it, and do it very well, we probably shouldn’t be destabilizing and toppling and invading other governments.

I don’t know if leaving Afghanistan right now is the right call, but it is obvious that the best outcome would have been to invade and establish a legitimate, stable and prosperous, democratic government behind … and that the second best outcome would have been to never occupy it at all.

Our inability to nation-build, or admit that we can’t do it, is deadly to American lives and treasure.

America didn’t always have trouble building other nations up: After World War II, the Marshall Plan restored prosperity and buttressed democracy across Europe. We have been able to do this well when we put our minds to it. I think it’s interesting, though, that our inability to build other nations up roughly coincided with the decline of public investment in our own country … we stopped engaging in our own major infrastructure projects, we stopped expanding social safety nets, we stopped prioritizing investment in public universities and schools.

That could be a coincidence, but I don’t think so.

I think that when we lost confidence in our ability to build a better society for ourselves, we lost the ability and imagination to help build them for others.

I would like to see what we could do if we spent as much money as we spent in Afghanistan to try and rebuild America’s infrastructure, schools and economy. Could we mobilize to do it successfully? What would it take? What would we learn?

This isn’t just a question of domestic policy and spending — it’s also a crucial question for our foreign policy and projection of power. Until we can learn to build nations again, every extended military engagement is going to turn into a Vietnam, Iraq or Afghanistan.

It’s better to know that now than it is 19 years after the fact.

Benjamin Wachs archives his work at www.FascinatingStranger.com. Email him at Benjamin@FascinatingStranger.com.