WASHINGTON -- The Afghan War -- really, the war against terrorists and their allies in Afghanistan and Pakistan -- has elements of a Greek tragedy. It was unavoidable, but seemingly unwinnable.

Following the murder of nearly 3,000 people on September 11, 2001, al-Qaida's gracious hosts, the Taliban, could not be allowed to remain in power. But in parts of Afghanistan, every valley is its own kingdom, ruled by tribal leaders who are loyal to the most likely winner. And the winner, it seems, may be determined more by patience than by firepower.

I recall the very start of the war in early October 2001. Sitting at the president's desk in his cabin at Camp David. Trying to focus on writing the announcement of military operations. President George W. Bush near me on the phone, giving military commands and informing congressional leaders of imminent hostilities. At one point, Bush put his hand over the receiver and asked me, "Are you cleared for any of this?" I replied that I didn't think so. "You are now," he said.

The speech Bush delivered from the Treaty Room warned of the long-term nature of our commitment. The war would be won by "the patient accumulation of successes." Bush asked for "patience in all the sacrifices that may come." But at the time, it was unimaginable -- at least in my limited, strategic imagination -- that the war would continue nearly two decades later.

After a brief, brilliant campaign that toppled the Taliban, there were a series of complications across the terms of three presidents. The diversion of attention and resources to Iraq. The inability to manage President Musharraf's pointless feuds, which undermined military pressure on the Taliban. An Afghan surge at first tried by President Obama on the cheap, then tied to an arbitrary withdrawal timeline. The consistently destructive role of Pakistan.

These are the conditions (among others) that recently led Thomas Joscelyn to conclude in the Weekly Standard, "America has lost the war in Afghanistan."

Yet every president, including Donald Trump, has been presented with the same strategic reality: The return of Afghanistan to the conditions on September 10, 2001 -- in which the country was a jihadist bed and breakfast -- would be a massive defeat for America and directly endanger its people. And a serious attack (say, using chemical or biological weapons) originating from a group protected by the Taliban or others would likely bring American troops back to the region anyway.

As Hal Brands and Peter Feaver have described it, America has tried "a heavy-footprint counterinsurgency strategy meant to decisively defeat terrorist groups while enabling the creation of effective government institutions -- in other words, nation-building." It has also tried "a very-light-footprint approach, relying on drone strikes and the occasional special operations raids." But circumstances in Afghanistan, Iraq and Syria have led America toward "a medium-footprint strategy" in which several thousand U.S. troops help to destroy terrorist safe havens and work to strengthen local partners, without the duties and risks of full-scale occupation.

Brands and Feaver count up the advantages of this approach. It allows the U.S. military to employ capabilities such as special-forces operations and air power, without diverting many resources from opposing great power threats. This strategy is relatively affordable (at least in dollars). And it has been effective against al-Qaida and ISIS.

But these scholars identify a large challenge: "A medium-footprint strategy requires accepting that the war on terror will indeed go on without a clear end in sight."

There is an unavoidable logic to a medium-footprint approach. Terrorist safe havens can't be left in peace for jihadists to prepare and increase their technical sophistication. But striking from afar with drones and planes (as we've seen) is not enough to destroy these havens. American troops are needed on the ground to gather intelligence, provide reconnaissance and embed with local partners. And these troops, in turn, must be adequately protected.

But will Americans accept -- will President Trump accept -- what amounts to a limited but indefinite, forward military presence in the Middle East to pre-empt emerging threats? Will Americans conclude that the resulting military casualties are worth it to prevent potential terrorist murders of civilians?

This would require people to view commitments like the one in Afghanistan in a different light -- not as a war that will eventually end, but as the furthest outposts of homeland defense. And as the terrible price of security in a hostile world.

Michael Gerson's email address is michaelgerson@washpost.com.