PRESIDENT BIDEN faced a painful dilemma in Afghanistan when he took office. Having committed the United States to removing all its troops from the country by May 1, then-President Donald Trump reduced the force to a bare minimum by January, even though Taliban insurgents had failed to fulfill their side of the withdrawal deal. Mr. Biden’s choice was to leave U.S. forces in place, risking renewed conflict with the Taliban, or go forward with the pullout — even though it could lead to the collapse of the Afghan army and government.

After a brief and seemingly halfhearted effort at diplomacy, Mr. Biden has decided on unconditional withdrawal, a step that may spare the United States further costs and lives but will almost certainly be a disaster for the country’s 39 million people — and, in particular, its women. It could lead to the reversal of the political, economic and social progress for which the United States fought for two decades, at a cost of more than 2,000 American lives and hundreds of billions of dollars. And, according to the U.S. intelligence community and a study commissioned by Congress, it could allow al-Qaeda to restore its base in Afghanistan, from which it launched the attacks of Sept. 11, 2001.

The bargain struck by the Trump administration with the Taliban required it to break all ties with al-Qaeda and other terrorist groups. According to U.N. and U.S. military officials, it has not done so. Nor has it been willing to negotiate seriously with the Afghan government about a peaceful settlement. It rejected a Biden administration proposal for a conference in Turkey to jump-start those talks, and it ridiculed U.S. proposals for a power-sharing arrangement with the government, as well as for new elections. The group’s leaders project the conviction that they will easily rout the government militarily once the United States leaves, and restore a harsh “Islamic emirate” such as the one they fashioned in the 1990s.

U.S. officials offer various rationalizations for abandoning the elected government of Ashraf Ghani to what will be, at best, a bloody fight for survival. Mr. Ghani also has resisted U.S. peace proposals, and his rule has been feckless. A strategy of leaving troops in the country in an effort to force the Taliban to compromise could extend the U.S. commitment for years without achieving a durable peace. Perhaps, too, some officials say hopefully, the Taliban will moderate its denial of women’s rights and other repressive policies to preserve international aid, without which Afghanistan’s economy would implode.

If that assessment proves wrong, Mr. Biden’s decision to remove U.S. forces by the symbolic date of Sept. 11, 2021, may simply result in the restoration of the 2001 status quo, including terrorist bases that could force a renewed U.S. intervention. At a minimum, it will mean an abandonment of those Afghans who believed in building a democracy that guaranteed basic human rights — and the nullification of the sacrifices of the American servicemen who were killed or wounded in that mission. Mr. Biden has chosen the easy way out of Afghanistan, but the consequences are likely to be ugly.

Read more: