By Associated Press

Here’s what 19-year-old Lance Cpl. William Bee felt flying into southern Afghanistan on Christmas Day 2001: purely lucky. The U.S. was hitting back at the al-Qaida plotters who had brought down the World Trade Center, and Bee found himself among the first Marines on the ground.

“Excitement,” Bee says these days, of the teenage Bee’s thoughts then. “To be the dudes that got to open it up first.”

In the decade that followed, three more deployments in America’s longest war scoured away that lucky feeling.

For Bee, it came down to a night in 2008 in Afghanistan’s Helmand province. By then a sergeant, Bee held the hand of an American sniper who had just been shot in the head, as a medic sliced open the man’s throat for an airway.

“After that it was like, you know what — ‘F—k these people,'” Bee recounted, of what drove him by his fourth and final Afghan deployment. “I just want to bring my guys back. That’s all I care about. I want to bring them home.”

As President Joe Biden ends the U.S. combat role in Afghanistan this month, Americans and Afghans are questioning whether the was worth the cost: more than 3,000 American and other NATO lives lost, tens of thousands of Afghans dead, trillions of dollars of U.S. debt that generations of Americans will pay for, and an Afghanistan that in a stunning week of fighting appears at imminent threat of falling back under Taliban rule, just as Americans found it nearly 20 years ago.

Also read: Joe Biden conducts security conference with officials amid Afghan violence

For Biden, for Bee and for some of the American principals in the U.S. and NATO war in Afghanistan, the answer to whether it was worth the cost often comes down to parsing.

There were the first years of the war, when Americans broke up Osama bin Laden’s al-Qaida in Afghanistan and routed the Taliban government that had hosted the terrorist network.

That succeeded.

The proof is clear, says Douglas Lute, White House czar for the war during the George W. Bush and Barack Obama administrations, and a retired lieutenant general: Al-Qaida hasn’t been able to mount a major attack on the West since 2005.

“We have decimated al-Qaida in that region, in Afghanistan and Pakistan,” Lute says.

But after that came the grinding second phase of the war. U.S. fears of a Taliban rebound whenever Americans eventually pulled out meant that service members such as Bee kept getting sent back in, racking up more close calls, injuries and dead comrades.

Lute and some others argue that what the second half of the war bought was time — a grace period for Afghanistan’s government, security forces and civil society to try to build enough strength to survive on their own.

Quality of life in some ways did improve, modernizing under the Western occupation, even as the millions of dollars the U.S. poured into Afghanistan fed corruption. Infant mortality rates fell by half. In 2005, fewer than 1 in 4 Afghans had access to electricity. By 2019, nearly all did.

The second half of the war allowed Afghan women, in particular, opportunities entirely denied them under the fundamentalist Taliban, so that more than 1 in 3 teenage girls — their whole lives spent under the protection of Western forces — today can read and write.

But it’s that longest, second phase of the war that looks on the verge of complete failure now.

The U.S. war left the Taliban undefeated and failed to secure a political settlement. Taliban forces this past week have swept across two-thirds of the country and captured provincial capitals, on the path of victory before U.S. combat forces even complete their pullout. On many fronts, the Taliban are rolling over Afghan security forces that U.S. and NATO forces spent two decades working to build.

Also read: Taliban captures Logar province, 50km south of Afghanistan capital Kabul

This swift advance sets up a last stand in Kabul, where most Afghans live. It threatens to clamp the country under the Taliban’s strict interpretation of religious law, erasing much of the gains.

“There’s no ‘mission accomplished,'” Biden snapped last month, batting down a question from a reporter.

Biden quickly corrected himself, evoking the victories of the first few years of the war. “The mission was accomplished in that we … got Osama bin Laden, and terrorism is not emanating from that part of the world,” he added.

Richard Boucher, assistant secretary of state for Central Asia during much of the war’s first decade, says the criticism was largely not of the conflict itself but because it went on so long.

“It was the expansion of war aims, to try to create a government that was capable of stopping any future attacks,” Boucher said.

America expended the most lives, and dollars, on the most inconclusive years of the war.

The strain of fighting two post-9/11 wars at once with an all-volunteer military meant that more than half of the 2.8 million American servicemen and women who deployed to Afghanistan or Iraq served two or more times, according to the Costs of War project at Brown University.

The repeated deployments contributed to disability rates in those veterans that are more than double that of Vietnam veterans, says Linda Bilmes, a senior lecturer in public policy at Harvard University.

Bilmes calculates the U.S. will spend more than $2 trillion just caring for and supporting Afghanistan and Iraq veterans as they age, with costs peaking 30 years to 40 years from now.

That’s on top of $1 trillion in Pentagon and State Department costs in Afghanistan since 2001. Because the U.S. borrowed rather than raised taxes to pay for the Afghanistan and Iraq wars, interest payments are estimated to cost succeeding generations of Americans trillions of dollars more still.

Annual combat deaths peaked around the time of the war’s midpoint, as Obama tried a final surge of forces to defeat the Taliban. In all, 2,448 American troops, 1,144 service members from NATO and other allied countries, more than 47,000 Afghan civilians and at least 66,000 Afghan military and police died, according to the Pentagon and to the Costs of War project.

All the while, a succession of U.S. commanders tried new strategies, acronyms and slogans in fighting a Taliban insurgency.

Kandahar’s airstrip, where Bee was quickly put to work digging a foxhole for himself over Christmas 2001, grew into a post for tens of thousands of NATO troops, complete with Popeyes and Burger Kings and a hockey rink.

Over the years, fighting forces such as Bee’s 24th Marine Expeditionary Unit moved into hot spots to fight the Taliban and build ties with local leaders, often only to see gains lost when their unit rotated out again. In Helmand province, which proved the turning point for Bee in 2008, hundreds of U.S. and other NATO forces died fighting that way. Taliban fighters recaptured the province on Friday.

Bee’s Afghanistan tours finally ended in 2010, when an improvised explosive device exploded 4 feet from him, killing two fellow service members who had been standing with him. It was Bee’s third head injury, and for a time left him unable to walk a block without falling down.

Was it worth it?

“The people whose lives we affected, I personally think we did them better, that they’re better off for it,” answered Bee, who now works for a company that provides autonomous robots for Marine training at North Carolina’s Camp Lejeune and is co-writing a book about his time in Afghanistan.

“But I also wouldn’t trade a handful of Afghan villages for one Marine,” he added.

Ask the same question in Afghanistan, though, and you get different answers.

Some Afghans — asked that question before the Taliban’s stunning sweep last week — respond that it’s more than time for Americans to let Afghans handle their own affairs.

But one 21-year-old woman, Shogufa, says American troops’ two decades on the ground meant all the difference for her.

The Associated Press is using her first name only, given fears of Taliban retribution against women who violate their strict codes.

When still in her infancy, she was pledged to marry a much older cousin in the countryside to pay off a loan. She grew up in a family, and society, where few women could read or write.

But as she grew up, Shogufa came across a Western nonprofit that had come to Kabul to promote health and leadership for Afghan girls. It was one of a host of such development groups that came to Afghanistan during the U.S.-led war.

Shogufa thrived. She deflected her family’s moves to marry her off to her cousin. She got a job and is pursuing a bachelor’s degree in business administration.

For Shogufa today, the gratitude for what she’s gained is shadowed by her fears of all that she stands to lose.

Her message to Americans, as they left and the Taliban closed in on Kabul? “Thank you for everything you have done in Afghanistan,” she said, in good but imperfect English. “The other thing was to request that they stay with us.”