(Bloomberg Opinion) -- As President Donald Trump tries to end America’s longest war, he has settled on a compromise. Instead of withdrawing all U.S. troops from Afghanistan by Christmas, as he boasted in a tweet in October, he will be leaving behind a small counterterrorism force.  

It’s tempting to view the development with a sense of relief. A full withdrawal from Afghanistan, or for that matter Iraq, would have been a humiliation for the U.S. on the world stage and a likely prelude to the collapse of two elected governments for which America has invested significant blood and treasure.

That said, avoiding calamity is not the same as wise statecraft. Trump’s final military act is reckless, particularly in Afghanistan. Officially, the U.S. will be reducing from around 4,500 U.S. troops to 2,500. (Some 500 of the 3,000 Americans in Iraq will also come home.) That will still mean, in theory, that the remaining forces will continue a counterterrorism mission against the Taliban and affiliated jihadists such as al-Qaeda and the Islamic State.

But it will also severely reduce the ability to train Afghan forces in the field. It will make it nearly impossible to recruit informants who provide context to intelligence collected through technical means, including overhead drone flights and intercepting digital communications.

Most important, a troop reduction at this moment undermines America’s diplomatic strategy. Earlier this year, the U.S. negotiated an interim agreement with the Taliban that tied troop reductions to the Taliban’s reduction in attacks and commitment to negotiating an end to its war against the government in Kabul.

To the surprise of no one, the Taliban have actually increased the pace of their attacks. In October, the Washington Post reported that in previous weeks they had staged ground assaults and bombings in 24 of Afghanistan’s 34 provinces. What incentive would the group have now to end its campaign?

Jim Golby, an Army lieutenant colonel and senior fellow at the Clement Center for National Security at the University of Texas at Austin (where I am also a fellow), told me this week he is worried that the U.S. withdrawal in Afghanistan will spur North Atlantic Treaty Organization allies to reduce their force levels as well. Golby was a senior adviser until this spring at the U.S. mission to NATO.

“How do allies and partners respond is the big question,” he said. “Their troop levels have moved with ours. When we increase, they increase; when we decrease, they decrease.”

Golby said he also worried that the force reduction would increase overall risk to U.S. forces, particularly moving into the spring, when the fighting season usually resumes in Afghanistan.

Trump’s troop drawdowns pose a challenge to President-elect Joe Biden as well. Nearly 11 years ago, when many in the Barack Obama administration were urging the president to surge forces in Afghanistan, Biden was a dissenting voice. The vice president advised his boss to instead pare down the U.S. mission, to just counterterrorism efforts.

In Foreign Affairs this year, Biden wrote that he wants to end America’s “forever wars” — but he stopped short of advocating a full withdrawal from Iraq and Afghanistan. Instead, he said, U.S. forces should commit to the narrow focus of defeating al-Qaeda and the Islamic State.

The problem with Trump’s plan of leaving just 2,500 troops behind is that it could invite more attacks from the Taliban. “It’s still unclear whether this is or is not a sustainable presence,” Golby told me. “Can we keep the Taliban at bay, will the security situation further deteriorate? We don’t know.”

If Biden’s military advisers (including the general who wanted the more ambitious Afghanistan strategy in 2009, Stanley McChrystal) advise that Trump’s reduced footprint presents an intolerable risk to the U.S. forces remaining in the country, Biden may find that one of his first acts as president will be to send more troops to a war he wanted to end 11 years ago.

Here may be an instructive moment for Biden. When he urged Obama to reject the surge in Afghanistan, there was barely an Afghan military at all. The U.S. was supporting corrupt warlords who drove many in the population to embrace the Taliban over the elected government. Corruption was rampant.

Today, Afghanistan’s military has several hundred thousand troops, and has conducted many joint operations with the U.S. against the Taliban. Corruption remains, but the elected government in Kabul has survived. Obama’s surge, in this respect, made it possible for the U.S. to have the much smaller footprint in Afghanistan today. That lesson has been lost on Trump. Let’s hope Biden comes to understand it.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Eli Lake is a Bloomberg Opinion columnist covering national security and foreign policy. He was the senior national security correspondent for the Daily Beast and covered national security and intelligence for the Washington Times, the New York Sun and UPI.

©2020 Bloomberg L.P.