President Trump reportedly wants to bring all U.S. soldiers home from Afghanistan by Election Day so that he can brag on the campaign trail about fulfilling his promise to "end endless wars." But if he doesn't do it right, the withdrawal from Afghanistan will blow up in his face, setting back broad-based efforts to change the course of American foreign policy.

It's understandable that the president would take the position he has on Afghanistan. From North Korea to China, Iran, Syria, Venezuela, and beyond, Trump's foreign policy has been a chaotic, incoherent mess. He campaigned against using the American military to undertake interminable exercises in nation-building and counter-insurgency. Yet nearly four years into his presidency, American troops remain in Syria, Iraq, and Afghanistan. Trump would like nothing more than to be able to campaign on having finally brought the longest war in American history to an end.

The problem is that a peace agreement reached with the Taliban on Feb. 29 set a timetable of more than a year for American troop withdrawal, with projected dates contingent on the Taliban meeting certain conditions. If the U.S. abandons that timetable and disregards those conditions, the Taliban will almost certainly treat it as an indication they can abandon the peace agreement the moment American troops depart. This implies it would be better to hold off on withdrawing from the country until after the election in November — which is clearly the consensus position inside the Pentagon and within Washington's foreign policy establishment.

But this presumes that the peace agreement with the Taliban will survive our departure if it comes in 2021 instead of in 2020. It won't. Whether American troops leave in the next few months, next year, or later this decade, the Taliban are bound to make a strong push to take over Afghanistan once we're gone — and they are very likely to succeed. The question then becomes whether this is an outcome we are willing to accept. If it is, it probably makes more sense to leave sooner rather than later — but only if Trump is willing and able to prepare the American people to accept this eventuality.

That is the challenge that confronts us. We either need to be willing to see Afghanistan fall to the Taliban — or be willing to keep troops in the country indefinitely. The latter option is the tripwire tactic that the U.S. first deployed after World War II, when we extended security guarantees to Western Europe, letting the Soviet Union know that any attempt to push the Iron Curtain further westward would trigger an American military response. We did the same thing a few years later with the armistice agreement between North and South Korea. Sixty-seven years later, the American tripwire (backed up by American troops) is still there in the Demilitarized Zone separating the two countries.

Today the U.S. has multiple tripwires in the Middle East, an informal but potentially momentous one in place between China and Taiwan, and a series of them under NATO auspices separating Russia from Eastern Europe. And then of course there's the one that's been in place in Afghanistan since we deposed the Taliban in late 2001, preventing their insurgency against American-backed successor governments from prevailing.

The tripwire tactic isn't designed to achieve a defined military goal — like the taking of territory from a foe or the decisive defeat of a foreign army — that is followed by victory, the completion of the mission, and the withdrawal of troops. Instead, we provide security guarantees to project American power across the globe, taking on responsibility for the preservation of order, stability, and peace in countries or regions thousands of miles from the American homeland. And this responsibility is almost never withdrawn — because to withdraw is to relinquish control, and to relinquish control is to risk the re-emergence of disorder, instability, and war, all of which would supposedly look like evidence of American fecklessness.

A foreign policy founded on military tripwires is one with no possibility of winning and the ever-present likelihood of losing. That's why the Pentagon is so reluctant to endorse withdrawal in Afghanistan — because as costly as a nearly two-decades-long mission in a country 7,000 miles away might be, it's better than that nearly two-decades-long mission culminating in the very thing the mission was intended to prevent. A slow, controlled bleed is much preferable to having to accept the blame when the whole thing goes south after we leave.

This is the dynamic Trump is pushing back against in trying to withdraw American troops from Afghanistan. The only way for him, his party, and those who favor withdrawal to avoid a massive (and perfectly predictable) round of blowback once the Taliban (in all likelihood) return to power is for him and his administration's surrogates to acknowledge this probable outcome and own it ahead of time, along with its broader implications.

What are those implications? That the U.S. has defined its interests too broadly since the end of the Cold War, if not before. That American security isn't assured or advanced by attempting to exert direct control over far-flung regions of the world. That attempting to do so is a form of light-footprint imperialism that drains American resources while giving our opponents an object of resentment that serves as a powerful catalyst for recruitment. That the political fate of Afghanistan is not a matter of pressing concern to the United States. That terrorist threats can arise in any country of the world, and that if such a renewed threat emerges in Afghanistan after our departure, we will deal with it swiftly and decisively, but without a renewed long-term military presence on the ground.

Though its critics are bound to denigrate such a shift in priorities as "isolationism," it need be nothing of the sort. The U.S. has the world's largest military in the world by far, along with roughly 800 bases in more than 80 countries and territories. (That's 90-95 percent of the world's extraterritorial military outposts.) We have historical ties and treaty obligations to NATO as well as long-standing interests in our own hemisphere. We face abundant opportunities and threats in Asia. Reassessing our priorities and selectively pulling back from some of our more costly security guarantees is not an act of withdrawal from the world or evidence of weakness. It's a realistic response to the wider world — a world with which we cannot help but to be actively engaged.

But this modest and defensible shift in priorities can only be accomplished if Trump undertakes the crucially important intermediary step of explaining the underlying rationale to American voters. Declaring that it's "time to bring our people home" and pinning hopes for a happy outcome on the Taliban playing nice in perpetuity isn't going to cut it. Instead, Trump and his political allies need to make clear that getting out of Afghanistan is in American interests regardless of what happens in the country politically after we're gone.

If Trump fails to do that — and in the midst of a sleaze-driven, lowest-common-denominator re-election campaign, he almost certainly will — the withdrawal of American troops will likely backfire, strengthening the hand of those who favor the extension of open-ended American military commitments in South Asia and elsewhere around the world.