As he began his presidency Donald Trump had the right idea about Afghanistan: “Let’s get out.” However, he surrounded himself with conventional thinkers who thwarted his wishes and refused to provide him with withdrawal options. After two years of additional, unnecessary American deaths, he apparently again is pushing for troop cut-backs.

Perhaps for this reason, administration officials are negotiating with the Taliban seeking a peace agreement that will allow an American pullout. The Kabul government, which purports to be both an essential U.S. ally and legitimate representative of the Afghan people, is on the outside looking in.

Nevertheless, progress supposedly has been made. But who will hold the Taliban to its promises, the president’s hawkish critics ask? Whatever the treaty’s terms, enforcement would require a continued U.S. military presence. Once American troops go home, they won’t return, absent overwhelming need. Saving the Kabul authorities won’t count. Thus, if the administration fulfills the president’s wish to pull out America’s 14,000 military personnel, the ability to hold the insurgents to their promises will disappear.

That doesn’t matter. The troops should come home. Quickly and permanently.

The Afghan war has largely disappeared from U.S. consciousness. With American combat participation way down, many people, other than those with family members or friends in the armed services, don’t even know that their nation is still engaged. Yet U.S. forces are aiding the Afghan military and casualties continue to mount. Washington struck al-Qaeda and ousted the Taliban more than 17 years ago. Since then American forces, along with contingents from European and other allied nations, have continued to fight. Afghanistan is the longest war in American history, beating out the Civil War, Spanish-American War, World War I, World War II, and Korean War combined.

And for what? After 9/11, the U.S. needed to wreck al-Qaeda for striking America and punish the Taliban for hosting al-Qaeda. Those objectives were quickly accomplished. Since then the effort has been nation-building, attempting to turn Afghanistan into a liberal, Western-oriented democracy ruled from the center. It’s a typically American vision — if only those stubborn Pashtuns would act like, say, Hoosiers! — but attempting to turn it into reality has proved to be a fool’s errand.

The Special Inspector General for Afghan Reconstruction recently reported that the number of districts under government control was less than 56 percent, down from 72 percent in just 2015. Taliban activity is up in formerly pacific areas, even where it never had much influence. The insurgents have begun hitting urban centers once thought beyond their reach. Suicide attacks are increasingly common in Kabul. Government casualties are up, with the most effective Afghan units badly stretched and reliant on U.S. support. Explained Anthony Cordesman of the Center for Strategic and International Studies, “U.S. Special Operations troops increasingly [are] being deployed into harm’s way to assist their Afghan counterparts.” On virtually every measure, the situation is worsening.

No answer will come out of Kabul. There are plenty of liberal-minded Afghans who want a free, humane society and brave Afghans in uniform fighting against the Taliban’s desire to live in another century — I met a number of them during my two visits to the country — but historically Afghanistan has been a nation in name only, ruled by the village and the valley. Afghans are divided politically, with little hope placed in the delayed presidential election. Despite, or more accurately, because of Western subsidies the Afghan security forces remain “ghosts,” nonexistent personnel enlisted to collect a paycheck.

Even supposedly well-intentioned outsiders are resented, despite the heavy reliance on their money and personnel. Under pressure within his own administration, the president initially added some 4,000 troops, but this is at most a tiny stopgap. With current force levels well below those of 2011, when U.S. and allied force levels, respectively, peaked at 110,000 and 140,000, victory, whatever that means, is well beyond reach. Washington’s policy has devolved into kicking the can down the road, hoping that withdrawal and collapse occur on the next president’s watch.

For this patriotic young Americans are dying.

No one appears to really believe that the Afghan government is capable of preserving itself. Or is likely to do so in the foreseeable future. Claims to the contrary are simply propaganda. Cordesman noted that “official U.S. and Afghan data seem to sharply understate the level of growing threat presence, influence, and control” and official claims “seem more spin than objective.” Honest observers inevitably are pessimists. Last May the Defense Department inspector general reported “few signs of progress.” Gen. Kenneth F. McKenzie, Jr., the Director of the Joint Staff who has been nominated to head U.S. Central Command, was even blunter: “I don’t know how long it’s going to take” for Kabul to take over its defense.

Not after 17 years of war. How about another 17? Or 17 after that? With every metric seemingly moving in the wrong direction, an increased effort seems necessary merely to sustain today’s unsatisfactory status quo. But nothing justifies the continuing commitment of lives and resources.

Of course, arguments for endless war are made. Perhaps the most appealing emotionally is the fate of Western-oriented Afghans, especially women and religious and ethnic minorities. The best they can hope for is a fractured nation, in which different factions and leaders (“warlords,” if you will) rule different regions. But as much as Americans might desire to plant liberal democracy in Central Asia, the U.S. cannot justify a permanent occupation without even a minimal connection to America’s basic interests. Without concern for the security of its own people, Washington would be occupying half if not more of the globe — including most of Afghanistan’s neighbors — and fighting in most of the world’s wars.

Is there some secret security interest at stake? Look at a map. The country matters, just not to the U.S. Russia, China, India, and Pakistan all have reason to worry about Afghanistan’s future. And Washington should invite them to begin planning for a post-U.S. future. None of them is interested in seeing the existing conflict overspread the country’s borders or create a sanctuary for al-Qaeda and the Islamic State. Washington should enthusiastically transfer its burden.

Is Afghanistan “one battle in a long, world war to defend the West against the resurgent and dynamic forces of jihadism,” in the words of Clifford May, head of the Foundation for the Defense of Democracies? In fact, the Taliban always has looked inward. Most of the insurgents just want to expel the outsiders. If jihadism is the issue, Washington would do better looking next door at Pakistan.

What if the Taliban again hosts al-Qaeda? Sen. Lindsey Graham, who never found a war he didn’t want other Americans to fight, warned that withdrawal “would be paving the way for a second 9/11.” The president said his own aides claimed “if we don’t go there, they’re going to be fighting over here.”

There may be no sillier argument. In 2001 it appears that the Taliban was none too happy at their guest, Osama bin Laden, misusing their hostility and bringing the wrath of Washington down upon the movement. It wouldn’t likely make the same mistake again. And Afghanistan doesn’t matter to al-Qaeda: bin Laden operated from Pakistan while 9/11 organizer Khalid Sheikh Muhammed lived most everywhere but Afghanistan. The U.S. should make the simple point that any government which hosts terrorists who attack America will regret doing so — for a very long time.

National Review’s David French worries about enhancing “jihadist prestige immeasurably. Insurgents will be able to make a plausible claim to have chased the Americans out of Afghanistan.” That may be so. But the answer is not to keep fighting an unnecessary, unjustified war which everyone else realizes is a mistake. Most major powers have had to acknowledge geopolitical errors and cut their losses, despite the resultant embarrassment, even humiliation. Afghanistan offers a powerful reminder: do not make commitments out of proportion to the interests involved. Better to learn the lesson and not make the same mistake next time, than to expect Americans to keep dying in an attempt to hide the obvious today.

It is hard for anyone to admit failure, especially government officials who have squandered thousands of lives and hundreds of billions of dollars. However, it is time for America to leave Afghanistan. A negotiated settlement would be best, of course. But a genuine settlement is only possible among Afghans. Rather than seeking to forge an unenforceable agreement, Washington should make clear its expectation that the Taliban will not tolerate resumption of terrorism from areas under the latter’s control. Whether part of a formal treaty or not, the U.S. will retaliate overwhelmingly against anyone implicated in a future attack. Otherwise Americans won’t be back.

The president was right: “Let’s get out of Afghanistan.” Now.

Doug Bandow is a Senior Fellow at the Cato Institute. A former Special Assistant to President Ronald Reagan, he is author of Foreign Follies: America’s New Global Empire.