The 18-year effort cost the United States alone $2.26 trillion, and the price in lives includes 2,442 American troops and 1,144 personnel among U.S. allies, according to figures from Brown University. NATO does not keep a record of those who die in its operations.

U.S. President Joe Biden and his NATO counterparts will bid a symbolic farewell to Afghanistan on Monday in their last summit before America winds up its longest "forever war" and the U.S. military pulls out for good.

The meeting is bound to renew questions about whether NATO's most ambitious operation ever was worth it.

The 18-year effort cost the United States alone $2.26 trillion, and the price in lives includes 2,442 American troops and 1,144 personnel among U.S. allies, according to figures from Brown University. NATO does not keep a record of those who die in its operations.

Those casualty figures dwarf Afghan losses, which include more than 47,000 civilians, up to 69,000 members of the national armed forces and police, and over 51,000 opposition fighters.

The military effort followed the 2001 arrival of a U.S.-led coalition that ousted the Taliban for harbouring al-Qaeda leader Osama bin Laden. Few experts argue that it brought long-term stability, meaningful democracy or security.

"At this point, you get the impression that NATO leaders almost want to downplay and leave quietly, rather than making too big a deal of it, and going on to focus on other business," said Erik Brattberg, director of the Europe Program at the Carnegie Endowment for International Peace.

With the U.S. leading the withdrawal, European allies and Canada want to hear Biden's thinking about how security will be assured at their embassies, along major transport routes and above all at Kabul's airport.

Many wonder whether the Afghan government can survive a resurgent Taliban. Some think Kabul's capitulation is only a matter of time.

"We are currently in intense discussions with our member states, the United States, NATO and the United Nations on the absence of essential security conditions for our continued diplomatic presence. It will be difficult to keep it" in place, European Union foreign policy chief Josep Borrell said.

For now, NATO plans to leave civilian advisers to help build up government institutions. It's unclear who will protect them. The 30-nation alliance is also weighing whether to train Afghan special forces outside the country.

As an organization, NATO will not provide sanctuary for Afghans who worked alongside its forces - routinely risking their lives - although a few individual members will. NATO Secretary-General Jens Stoltenberg says it's simply time to leave.

"Afghanistan has come a long way, both when it comes to building strong, capable security forces, but also when it comes to social and economic progress," he told The Associated Press. "At some stage, it has to be the Afghans that take full responsibility for peace and stability in their own country."

Few Afghans share that assessment of their country, which has a 54% poverty rate, runaway crime, rampant corruption and an illicit economy that outstrips the legal economy.

When NATO took charge of international security operations in 2003, Afghanistan was its first major mission outside Europe and North America. The aim was to stabilize the government, build up local security forces and remove a potential base for extremist groups.

Yet 18 years later, security is at its lowest ebb for most Afghans. The capital is rife with criminal gangs, many linked to powerful warlords, and there are routine attacks by an upstart Islamic State.

Quite early into the operations, as combat took its toll on NATO troops, extremists and civilians, a stalemate developed. The Taliban could not be routed from outlying areas, but neither could its fighters seize and hold major cities.

Troop surges made little difference, and it soon became clear that NATO's military training effort was its exit strategy. Only by creating a big army capable of standing on its own feet could the organization wind up its operations.

But the Afghan army was plagued by corruption, desertion and low morale. Experts say it still is, and this remains a major concern as NATO insists on funding the nation's security forces after it's gone.

Donald Trump's unilateral decision to leave by May 1 stunned U.S. allies. It highlighted NATO's weakness: European members and Canada simply cannot sustain major operations without logistical support from their biggest partner.

Biden's decision to pull U.S. troops out by the 20th anniversary of the 9/11 attacks on New York and Washington changed little, although he did consult allies this time.

James Dobbins, a former Afghan envoy who now works for the RAND Corporation think tank, predicts the exit will mean the loss of government legitimacy.

"The U.S. departure will be seen as a victory for the Taliban and a defeat for the United States," he said in an opinion piece. "The result will be a blow to American credibility, the weakening of deterrence and the value of American reassurance elsewhere."

On Monday, NATO's leaders will reaffirm the strength of their alliance and go back to what they know best: their old nemesis, Russia. Biden will brief his partners before meeting with Russian President Vladimir Putin. Afghan President Ashraf Ghani was not invited to NATO's summit.

"There is little appetite left to continue investing in Afghanistan," Brattberg said. "There is a sense of being fed up in a lot of NATO countries, and now it's just time to pack the bags and get out with little consideration about the consequences that could have on the ground."