In a matter of days, Afghanistan fell to Taliban control after 20 years of war. The rapid takeover by the Taliban is squarely on the shoulders of President Joe Biden, and it will have massive national security repercussions for years to come.

The vast majority of Americans—Left, Right, and center—agree that after 20 years, it is time for the United States to end its longest war in history. But do not confuse that widespread sentiment to mean that the public agrees with the disastrous withdrawal ordered by Biden.

Last February, the U.S. agreed to a deal with the Taliban and the Afghan government to withdraw troops over the next year, in a conditions-based manner, meaning if the Taliban halted attacks against U.S. and Afghan forces. I was in Kabul with Secretary of Defense Mark Esper, Afghan President Ashraf Ghani, and representatives of the Taliban to solidify this decision. Some 2,000 miles away in Doha, Secretary of State Mike Pompeo and the diplomatic representative of Afghanistan and Taliban were signing a “peace” agreement.

At that time, the U.S. had 14,000 troops in Afghanistan. Over the course of the next few months, the U.S. and our NATO coalition partners began withdrawing troops from the region. By May, there were 9,500 troops left in Afghanistan. By November 2020, we were down to 5,000 troops, and in early January 2021, we had under 2,500 troops in the country.

Remarkably, the peace largely held. There were one-off Taliban attacks in provincial regions and lone actor attacks, but, largely speaking, the country remained stable. Fast forward a few months, and Biden announced the U.S. would draw our troops down to zero by Sept. 11.

What we learned in the period from roughly March 2020 to January 2021 should have been instructive. A highly trained rotation of roughly 2,500-3,000 U.S. forces alongside Afghan security forces was enough to keep the Taliban and other terrorist elements from running roughshod over the country. It was a perfect compromise to maintain a fragile peace.

The U.S. also offered the critical air and surveillance capabilities the Afghan military didn’t have.

Now, under Biden’s disastrous policy, the U.S. is walking away from hundreds of billions in infrastructure that we built over the last 20 years to benefit our security interests in the region, including a massive air base conveniently located between Iran, Pakistan, and Russia. We are also jeopardizing years of intelligence and surveillance capabilities in the region. The Biden administration is also leaving billions of dollars in military equipment to be used by the Taliban and other terrorist entities.

In no time, we can expect China will be in Afghanistan under the guise of reconstruction.

This is not an argument for prolonged war in Afghanistan—quite the opposite. We have small troop presences in more than 100 countries around the globe in locations that serve U.S. security and strategic interests.

As the country falls, we cannot forget the major humanitarian gains the U.S. and NATO coalition were able to help secure for the Afghan people that now look very fragile. Women in Afghanistan were freer than ever. Under prior Taliban control, women were barred from public life. In the last election, women made up 35% of the electorate.

Girls have access to education. At the outset of the war, fewer than a million boys were in school and virtually no girls. Today, there are 9.7 million students enrolled in schools, and more than a third are girls. The infant mortality rate fell from 53 to 23 per 1,000 births.

Now, the Biden administration is deploying 3,000-plus forces to the region to evacuate U.S. personnel because of its abject failure to secure their departure safely. In the coming months, we will read of atrocities committed by the Taliban and watch in horror as it systematically undoes the decades of work we did in the region. It seems almost inevitable that the U.S. will be forced back into Afghanistan for another prolonged military engagement.

Alyssa Farah is a visiting fellow with Independent Women’s Forum. She’s the former press secretary for the U.S. Department of Defense.