With the last C-17 flight out of Kabul Monday night, the unvarnished truth is that America’s war in Afghanistan is over. We must keep faith with Americans and Afghans left behind. And we’ll have a season of assessing blame for what happened. But we’ll compound the Afghanistan mistake if we keep fighting this last war.

The eerie final image, captured in the yellow-green light of night vision, shows Maj. Gen. Chris Donahue, the last U.S. military commander, walking as if into a different galaxy. That’s as it should be. We need, as the literary critic Frank Kermode titled one of his books, “the sense of an ending.” The curtain has come down, and we can start something new.

“I was not going to extend this forever war, and I was not extending a forever exit,” President Biden said Tuesday in an emphatic defense of his decisions to withdraw troops and the final, messy evacuation from Kabul airport. He spoke of a broader shift, too. “It’s about ending an era of major military operations to remake other countries,” Biden said, and of easing the burden on a U.S. military that has been at war for two decades.

Afghanistan will present serious counterterrorism challenges for the United States, but they will be different from the ones that took us to war in 2001, in the shadow of 9/11. The United States is far better protected now; intelligence and law enforcement here and around the world are much better integrated. The Islamic State is a threat in Afghanistan, but it suffered pulverizing defeats in Syria and Iraq. Al-Qaeda lives, but feebly. It didn’t win this war.

And the Taliban? We honestly don’t know whether this insurgent group is prepared to be more inclusive and avert a renewed civil war. For now, we just need to watch and assess — protecting our people and interests and reacting to the Taliban’s decisions. For a change, it has the urgently ticking watches, and we have the time.

“How do we all make a paradigm shift?” asks one senior intelligence official. Afghanistan is now just one of a dozen potential sources of global terrorism, rather than ground zero. Assessing the different players in Afghanistan and their intentions, capabilities and motivations will be a hard intelligence problem, but not an impossible one compared with other terror threats. Close-in neighbors, such as Russia, China, Pakistan and Iran, may have a greater interest in checking threats from postwar Afghanistan than we do.

What went wrong in Afghanistan? We’ll be haunted by that question for years, just as we were after the humiliating retreat from Vietnam in 1975. Over the 20-year arc of the war, it has been a story of U.S. overreach and, at times, a self-deluding refusal to face facts. But the United States has been gradually ending its combat mission since 2014, and by this year it had reduced its military presence to a small, sustainable force — a “term insurance policy,” as Gen. Joseph F. Dunford Jr., former chairman of the Joint Chiefs of Staff, liked to describe it.

Biden insisted Tuesday that maintaining this small force, as his military advisers initially recommended, was impossible. There was no middle ground, he argued — his choice was between “leaving or escalating.” To those who advocated the limited alternative, he countered: “There is nothing low grade or low risk or low cost about any war.”

A new poll suggests the public agrees with Biden on withdrawing troops but believes the subsequent process of withdrawal was mishandled. According to the Pew Research Center, 71 percent of those polled said handling of the evacuation was “only fair” or “poor.”

The problem with the evacuation, in part, was that military and civilian efforts were operating on different clocks. The military raced out by July 1, embracing the generals’ credo, “speed is safety,” and leaving behind only a token force of 650. The civilian withdrawal proceeded at a slower pace, moving more like “pond water” than a rushing torrent, in the words of one four-star general. That was partly because Biden had promised President Ashraf Ghani to avoid a rush for the exits that might trigger a panic. It turned out that it was Ghani himself who panicked and fled for his life, handing Kabul to the Taliban.

Critics argue that the generals withdrew too fast from Bagram air base, the center of U.S. power in Afghanistan. That criticism is both right and wrong. Bagram is 45 miles from Kabul, with a huge perimeter, and protecting it would have required 4,000 U.S. troops, estimates one senior military official. The generals decided instead to protect the embassy and Kabul airport with their limited force of 650; that was a reasonable choice under the constrained circumstances. The real issue is whether the military should have demanded more troops and a better-organized final exit strategy. The answer there is, yes.

Whatever errors Biden, the military and the State Department may have made, they were partly redeemed by the brave effort to evacuate 120,000 Americans, Afghans and others in the face of imminent terrorist attack. That’s not Saigon 1975. This withdrawal may have begun with the mad desperation of people clinging to planes, but despite the terrible loss of life, it ended with control, courage and a measure of dignity.

Biden touted the evacuation as an “extraordinary success.” Gen. Mark A. Milley, chairman of the joint chiefs, offered a humbler benediction in an Aug, 26 statement of condolence for the 13 Americans who had been killed at Kabul airport. “They gave their lives to save others; there is no higher noble calling.”

For them, and for all of us, this war is done. What we learned after Vietnam is that defeated nations become strong again only when they regain their balance and see the world through new eyes.