August 15, 2021 9:39 PM EDT

In early July, President Joe Biden informed the American people of the coming drawdown of U.S. forces from Afghanistan after a 20-year occupation. The evacuation would be “secure and orderly,” he said, with little chance of a Taliban takeover. “The likelihood there’s going to be the Taliban overrunning everything and owning the whole country is highly unlikely,” he said.

Little more than a month later, Biden has been proven wrong on all counts.

The Taliban took over Afghanistan on Sunday, entering the capital city of Kabul with no resistance after a two-week-long blitz in which multiple provincial capitals fell into the insurgents’ hands. President Ashraf Ghani fled the country on Sunday, abandoning his fortress-like palace to the black-turbaned militants who roamed freely in his offices by the day’s end. U.S. diplomats, meanwhile, rushed to destroy sensitive documents and equipment at the sprawling U.S. embassy. The building’s American flag was lowered and flown aboard a helicopter to the Kabul airport, where U.S. personnel gathered for safety.

Taliban fighters drive into Kabul on Aug. 15.
Jim Huylebroek—The New York Times/Redux

Like a long-anticipated death, Americans knew this day would come, but the collapse was so sudden and complete that it was stunning when it finally did. It’s a reality difficult to fathom after nearly two decades of U.S. involvement in Afghanistan, more than 2,300 of its troops dead, more than 20,000 wounded, hundreds of thousands of Afghans maimed or killed and $2 trillion spent. On the 20th anniversary of the 9/11 attacks this September, a Taliban flag will fly over Afghanistan.

Biden’s miscalculation could alter his presidency and weaken U.S. standing overseas. He supported the invasion two decades ago but had long since concluded it was time to leave, and he got elected to the presidency on a platform of pulling troops out. So how could the White House have been caught so flat-footed? Biden Administration officials routinely argued that Afghanistan’s 300,000-plus troops and police, which the U.S. has spent at least $84 billion to train and equip, vastly outnumbered the estimated 75,000 Taliban fighters. They pointed to Afghanistan’s air force of attack planes and helicopters, which were also paid for by the U.S., as well as the firepower and heavy weaponry.

In the end, though, not one piece of this multibillion-dollar arsenal, which now all belongs to the Taliban, could replace the willingness to fight or the instinct for survival, as Afghan troops saw that fellow soldiers who surrendered to the militants were allowed to live and those who fought were often brutally executed.

U.S. intelligence assessments initially estimated that Afghan security forces could stave off Taliban offensives against major population centers, like Kabul, for a year or possibly more. Just this month, the timetable was significantly downgraded to within 30 days or less, according to two current U.S. officials. Instead, Afghan defenses lasted 10 days, as the troops repeatedly acquiesced to the insurgents, allowing them to walk through Kabul’s city gates untouched.

The U.S. is now working through the logistical nightmare of evacuating thousands of American and Afghan personnel along with their families. The airport represents the sole means of escape since the Taliban has methodically encircled the capital and cut off critical supply routes in and out of the city. Taliban spokesmen have repeated that anyone who wants to leave, can, unmolested, but few Afghans want to test that public promise with their lives, as sporadic gunfire and looting has broken out across Kabul overnight.

Smoke rises next to the U.S. Embassy in Kabul late on Aug. 15.
Rahmat Gul—AP

Biden ordered thousands of U.S. forces to the Kabul airport to help evacuate Americans and Afghans who collaborated closely with the U.S. for decades. Congressional lawmakers were told Sunday during a 45-minute conference call with Secretary of State Antony Blinken, Defense Secretary Lloyd Austin and General Mark Milley, chairman of the Joint Chiefs of Staff, that the first of 6,000 U.S. troops began to arrive at the Kabul airport over the weekend. Lawmakers were told there were tens of thousands of Afghans who could qualify for Special Immigrant Visas, according to a person familiar with the call.

General Kenneth McKenzie, commander of U.S. military operations in the Middle East, is now overseeing the evolving situation from a base in the region. A U.S. military official tells TIME they are working to safely evacuate Americans, and as many Afghans “as possible” who might be at risk of Taliban reprisals.

Meanwhile, Afghan officials outside the country are working to get out their colleagues who might face retribution if they were left behind. One in the Gulf is working to bring a plane from Qatar to pick up senior Afghan government staffers and some of their families. But by late Sunday, commercial flights at the city’s airport were suspended amid intermittent gunfire—and only military aircraft were allowed to operate. “A lot of dignitaries are stuck in the airport like sitting ducks,” the official says. “There is no immigration officer to stamp passports. It’s total chaos.”

The official shared with TIME a cell phone video he got from a friend trying to get out at the airport, of panicked Afghans rushing to board an empty aircraft, not waiting for permission, standing in the aisles and refusing to give up their seats to the ticketed passengers. With reports of gunshots and militants on the civilian side of the airport, the senior Afghan officials are torn. “We don’t know if it’s a wise decision to sit in the airport, but they fear for their lives if they go back to the city,” the official says.

Pentagon spokesman John Kirby said U.S. forces have now assumed responsibilities for air traffic control at the airport. “Commercial traffic continues, though it has experienced some sporadic stoppages and delay,” he said in a statement. “Several hundred civilians, including personnel and private U.S. citizens, have been evacuated so far. We continue to build capacity to expedite processing for at-risk Afghan civilians.”

Other senior Afghan officials have opted to stay. An aide of Dr. Abdullah Abdullah, chairman of the country’s High Council for National Reconciliation, tells TIME that he will be flying to Doha, Qatar, as part of a team that includes former Afghan President Hamid Karzai to negotiate the shape of the incoming government. U.S. and Taliban officials did not respond to requests for comment.

Sworn enemies of the Taliban like Afghan Vice President Amrullah Saleh and Ahmad Masood, the son of assassinated Northern Alliance leader Ahmad Shah Masood, have remained in the country, returning to their home province of the Panjshir, multiple current and Afghan officials say. Saleh messaged TIME that he is in one of his “mountain bases.”

Ghani, for his part, posted a statement on Facebook that detailed his reasons for fleeing. “If I had stayed, countless countrymen would have been martyred and Kabul city would have been ruined, in which case a disaster would have been brought upon this city of five million,” he said.

Men crowd into an Internet café while seeking help with applications for the Special Immigrant Visa program in Kabul on Aug. 8.
Paula Bronstein—Getty Images

Meanwhile, the situation is perilous for everyday Afghans who don’t have the means or connections to leave. U.S. officials who worked in Afghanistan are getting panicked messages from Afghan translators and other staff who weren’t granted U.S. visas in time, or couldn’t get to the airport where U.S. officials are trying to rush through thousands of applications before sending them on to Qatar for further security checks and processing.

“I’m still out here and waiting for the U.S. to save me,” one Afghan messaged a long-serving U.S. official. “How do you respond to messages like this?” the official asks. “I’ve been getting them all day.”

The United States’ longest war may be drawing to an end, but the bloodshed is far from over. The world’s focus will be on the safety of Afghan allies and Afghan women, who were systematically victimized under the Taliban. Biden, however, figured this into his calculation long ago. “Do I bear responsibility? Zero responsibility,” he told CBS in February 2020 of the possibility women would lose rights under a new Taliban rule. “The responsibility I have is to protect America’s national self-interest and not put our women and men in harm’s way to try to solve every single problem in the world by use of force.”

With reporting by Alana Abramson/Washington

Write to W.J. Hennigan at william.hennigan@time.com.

Read More From TIME

EDIT POST