A U.S. Marine holds an Afghan baby at the airport in Kabul, Aug. 28.

Photo: victor mancilla/Agence France-Presse/Getty Images

As the Biden administration struggles to contain the fallout at home and abroad from the chaotic withdrawal from Afghanistan, the president and his team still seem to hope the political pain will be short-lived, that over time the benefits of withdrawal will increasingly bolster their position.

Abroad, the theory runs, the withdrawal frees the U.S. from a costly distraction and enables us to focus more on China. Let Russia worry about fanatical jihadist warriors and missionaries fanning out across Central Asia with the latest American weaponry. Let China cope with the double-dealing, back-stabbing, perpetually indigent Pakistani government. Let Iran deal with newly empowered Sunni zealots, uncontrolled opium flows and a stream of refugees pressing on its frontiers.

At home, Bidenites hope Afghanistan will be in the rearview mirror long before the midterm elections. Swing-district Democrats can immunize themselves by criticizing the administration over the execution of the withdrawal; all Democrats will benefit from their association with a president who, however inelegantly, is ending unpopular wars rather than starting new ones.

These hopes are not completely unfounded, and Republicans who want to ride the Afghanistan issue back into power may be disappointed. History, however, always punishes failure. Both the Biden administration and the U.S. will pay a price for the mix of strategic fecklessness and tactical bungling that brought a 20-year stalemate to this inglorious end.

The Biden team has already discovered part of the price: Instead of freeing it to think about Afghanistan less, the messy withdrawal means that for the foreseeable future the White House will have to care more about what happens there but with fewer tools to manage the situation. An unknown number of U.S. citizens and permanent residents and Afghans eligible for Special Immigrant Visas will be left behind, along with their dependents. Not only the Taliban but any armed faction can trigger a political crisis in America by seizing or mistreating these vulnerable people.

Meanwhile, allied countries that sent personnel to Afghanistan and developed in-country networks of Afghan employees and supporters blame the administration for failures of policy, intelligence and consultation that made the timely and safe extraction of their people difficult or impossible.

Officials hope to manage these problems by dangling promises of aid to the new Afghan regime, which badly needs money. One wishes these officials well, but paying Danegeld to the Taliban is unlikely to enhance President Biden’s prestige overseas or shore up his popularity at home.

Trouble in Afghanistan is only part of the blowback facing the administration. Allies, adversaries and neutrals abroad have revised their assessments of Washington’s strategic wisdom and tactical competence in light of the debacle. The U.S. will face more challenges from its adversaries and must work harder to build support among friends.

China, for example, is more likely to confront what it sees as a weakened and shaken America than to befriend it. An early test will come as the Biden team seeks Chinese support for efforts to respond to North Korea’s apparent decision to restart operations at its Yongbyon nuclear reactor. And how diligently will Beijing use its immense influence over Pakistan to prevent that country from helping jihadist radicals shift weapons and resources from Afghanistan to India’s Kashmir region and points south?

Vladimir Putin can also read the signs of the times. The American defeat in Afghanistan is not the only piece of news making this a good summer for the Kremlin. Nord Stream 2 is a done deal. Oil and gas prices are high. The Western response to the crackdown in Belarus was farcically incompetent, with economic sanctions only driving President Alexander Lukashenko more firmly than ever into the Kremlin’s embrace. The relentless squeeze on Mr. Putin’s domestic opponents has been largely ignored by a distracted and divided West. Even before the debacle, Mr. Putin flatly rejected Mr. Biden’s request for U.S. bases in Central Asia last June. Post-Afghanistan, Washington should brace for an even more emboldened Russia.

Elsewhere, Kabul’s collapse increases the chance of an American confrontation with Iran. Iranian hard-liners feel vindicated by what they will interpret as signs of an accelerating U.S. retreat and decline. Why, many will argue in Tehran, should they offer the Biden administration an easy path back into the 2015 nuclear deal? Meanwhile, to keep Israel and its Arab partners onside, Mr. Biden doubled down on his commitment that Iran will “never” gain nuclear weapons, promising “other options” if diplomacy fails. The president did not say how he reconciles that pledge with the reality that the nuclear deal at best delays Iran’s path to a bomb.

Mr. Biden’s options today are both fewer and uglier than they were a month ago. His standing in the polls has also declined. That’s what happens when policies fail.

Thousands remain left behind in Afghanistan as U.S. forces withdraw from Kabul following President Biden's political strategy of simply getting out of the country, irrespective of the consequences. Image: Marcus Yam/LA Times/Getty Images The Wall Street Journal Interactive Edition