As he forcefully told the nation on Monday, President Biden remains determined to get all U.S. forces out of Afghanistan. There is no undoing that decision, despite the collapse of the Afghan state, or the indelible scar on U.S. foreign policy left by scenes of chaos at Kabul’s international airport.

The reputational damage — to the United States and this president — may yet be contained, if the Biden administration can rescue Afghans who supported our effort over the past 20 years, and who now wish to leave Afghanistan for fear of the conquering Taliban.

Biden pledged just that on Monday; he said the effort, which has so far included a fresh deployment of 6,000 U.S. troops to secure Kabul’s airport, will be “short in time.” Keeping this promise would indeed constitute a meaningful victory amid an otherwise humiliating setback.

History suggests, however, that Biden can conduct a complete evacuation or a quick one — but not necessarily both — given the unique, and uniquely unfavorable, conditions the United States faces.

In addition to several thousand U.S. citizens, probably tens of thousands of Afghans both want to leave and have a plausible claim on U.S. help in doing so. A fair estimate of the number of former translators and others with U.S. links eligible for the special immigrant visa program would be 80,000, including their families.

These estimates imply a mission similar in scale to the largest-ever civilian air evacuation: more than 110,000 Indian nationals brought home from Kuwait, via 488 Air India flights, after Iraq invaded and occupied that emirate in August 1990. The operation lasted 63 days.

The United States evacuated 50,493 people, including 2,678 Vietnamese orphans, from Saigon, South Vietnam, between April 1 and April 29, 1975, using fixed-wing planes. (Helicopters famously took out another 7,000 on April 30.)

Israel probably set some kind of record by extracting 14,000 Jews from war-torn Ethiopia in just 36 hours in 1991, using 34 aircraft including Israeli C-130s and 747s (one reportedly stuffed with more than 1,000 passengers) operating around the clock.

In a recent report on lessons from the 1990 Indian airlift, Constantino Xavier of the Center for Social and Economic Progress, a New Delhi think tank, noted that the most dangerous and difficult airlifts are those that seek to gather and move thousands of widely dispersed evacuees, in a short time frame, from a distant crisis area, amid volatile or violent local conditions ruled by hostile authorities or factions.

India could get so many people out in part because they were concentrated in Kuwait and because Iraq cooperated, giving safe passage by land to neighboring Jordan, whence evacuees departed for home. Violent though Vietnam was, the United States had arranged gathering points for evacuees and enjoyed nearly 30 days of unimpeded access to a military airfield.

Israel had previously brought Jews from rural areas to designated locations in Addis Ababa, then cut a secret deal with Ethiopia’s rulers to use the airport — albeit for only 48 hours.

The United States has unparalleled capabilities but faces a worst-case scenario regarding each of Xavier’s risk factors: The number of evacuees is huge; they are scattered about the country and Kabul; the city is remote from the United States; the local political environmental is turbulent; if anyone rules, it is the very force that people are trying to flee; and the president is in a hurry.

“The U.S. military controls the perimeter of the airport and the Taliban controls everything else,” says Rep. Tom Malinowski (D-N.J.), who has been leading bipartisan congressional pressure on the Biden administration to make sure none of the Afghans who are counting on the United States are left behind.

The Biden administration must enable Afghans who want to leave to identify themselves to the United States and — somehow — open a safe corridor for them between the city and the airport.

“All you can do is tell the Taliban not to interfere, and back that up with the appropriate threat, then tell everyone on our list to come to the airport now,” Malinowski suggested.

In short, Biden’s plan to get the last 2,500 U.S. troops out by Aug. 31, the goal of which was avoiding a new conflict with the Taliban, has spawned a follow-on crisis, which might well require 6,000 troops — or more — to stay beyond Aug. 31. And these troops must threaten to meet a Taliban attack with what the president calls “devastating force,” a.k.a. restarting the war.

Perhaps it will work. National security adviser Jake Sullivan said Tuesday that the Taliban, among many conciliatory gestures, has made a “commitment” to let civilians through to the airport, though the duration of the safe passage remains to be agreed.

Or perhaps this is just another Taliban charm offensive. Either way, the Taliban is calling the shots. Everything — the airlift, Afghanistan’s future, history’s judgment on Biden’s leadership — now depends on whether this triumphant terrorist army considers it advantageous to let the Americans, and their friends, depart in peace.