President Biden has watched a parade of presidents set sweeping goals for the United States overseas, only to become entangled in long-running, slow-bleeding problems. Now that he has the job himself, Biden is determined to avoid the same fate.

Biden sees the war against the Taliban as a drag on the need to deal with bigger threats like China, climate change, the coronavirus pandemic — and even a terrorism menace that has mutated significantly in the two decades since the attacks that launched the Afghan war to begin with. He is also focused on threats from Russia and the decline of U.S. influence abroad.

Biden will lay out plans Wednesday to withdraw all U.S. forces from Afghanistan by Sept. 11, the 20th anniversary of the al-Qaeda attacks on the United States that were planned from Afghan soil. The announcement makes good on Biden’s campaign promise to close down the nation’s longest war and is in keeping with his view that wars become self-perpetuating if the generals call the shots.

“The president has been consistent in his view that there’s not a military solution to Afghanistan, that we have been there for far too long,” White House press secretary Jen Psaki said Tuesday, adding that “he also believes we need to focus our resources on fighting the threats we face today, 20 years — almost 20 years — after the war began.”

Biden in coming days and weeks is starkly signaling his belief that the United States needs to shift its focus to other parts of the globe, especially Asia.

The announcement Wednesday comes two days before Biden hosts Japanese Prime Minister Yoshihide Suga, the first foreign leader to visit the Biden White House, for a session expected to focus heavily on threats from China.

It also comes as U.S. climate envoy John F. Kerry is expected to soon become the first top Biden administration official to visit China, and a day after Biden had invited Russian President Vladimir Putin for a future summit. Biden has also invited both Putin and Chinese President Xi Jinping to attend a U.S.-sponsored climate summit later this month.

Those efforts are challenge enough without the weight of legacy conflicts that have bogged down presidents for decades, Biden foreign policy advisers said.

Three presidents tried and failed to dig out of the war in Afghanistan, and Biden was vice president when one of them, Barack Obama, ended up significantly expanding it instead. Biden had opposed the Pentagon’s plan to begin adding forces in 2009, the first year of the Obama-Biden administration, and maintained his suspicion as the war swelled.

Now Biden has the chance to act on his long-held views, and he is taking it less than three months into his administration.

“The president deeply believes that in contending with the threats and challenges of 2021 — as opposed to those of 2001 — we need to be focusing our energy, our resources, our personnel, the time of our foreign policy and national security leadership on those threats and challenges that are most acute for the United States,” a senior Biden administration official said Tuesday.

“Doing that requires us to close the book on a 20-year conflict in Afghanistan and move forward with clear eyes and an effective strategy to protect and defend America’s national security interests,” the official added.

The official spoke on the condition of anonymity under rules set by the White House.

The same theory applies to Biden’s effort to downgrade the Middle East as a central priority, with the exception of a focus on Iran’s nuclear program. He has distanced himself from both the Israeli and Saudi leaders and made no moves to launch peace talks between Israel and the Palestinians — a contrast with many of his predecessors who took office determined to be the president who brings peace to the Middle East.

Biden, unlike most recent presidents, came to the White House with decades of experience watching other presidents succeed and fail, and he has made it clear he is trying to learn the lessons of their experiences.

Before serving as vice president, when he handled an array of foreign policy challenges for Obama, Biden chaired the Senate Foreign Relations Committee, giving him an extended window into the way presidents try to shape the U.S. role in the world.

Most of Biden’s priorities are hard pivots away from the policies and whims of former president Donald Trump, from bolstering the U.S. connection to the European Union and NATO to sharply criticizing Putin. Restarting talks with Iran last week is another example.

But in the case of Afghanistan, Biden is pursuing a goal he actually shares with Trump: ending the U.S. military presence in Afghanistan by a date certain. Although Trump failed to withdraw all forces on his watch, he set a May 1 deadline that Biden is now leveraging, extending the deadline by only a few months.

Biden usually likes to take the high road in comparisons with Trump, whom he dismissed at one point as “the former guy.” His announcement Wednesday is likely to include a whiff of one-upmanship, as the Democratic foreign policy experts say he is pulling off what the Republican iconoclast failed to do.

Still, Democrats acknowledge privately that Trump started the process that Biden is now finishing.

Biden also seeks to vindicate a long-held view that the U.S. military in Afghanistan was often fighting the wrong enemy — the domestic Afghan Taliban insurgents — rather than the foreign-born terrorists the operation originally targeted, according to people who have discussed the war with Biden.

The president has also said U.S. forces unintentionally became part of the problem, and he argued that the solution was not to add more troops.

The drawdown will begin this month, ahead of Trump’s May 1 deadline, and continue through the summer months, U.S. officials said Tuesday. The key difference from Trump will be coordination with NATO allies and other partners and a plan for an orderly withdrawal, U.S. officials said.

The Sept. 11 date is firm and leaves no room for a small counterterrorism force once envisioned as a hedge against a resurgence of al-Qaeda or similar threats, the senior Biden administration official said.

Biden had been considering that option as recently as February. But he concluded that every time the United States makes its moves in Afghanistan dependent on conditions on the ground, those conditions result in staying engaged.

“This is not conditions-based. The president has judged that a conditions-based approach, which has been the approach of the past two decades, is a recipe for staying in Afghanistan forever,” the official said.

Some Republicans, including Senate Minority Leader Mitch McConnell (R-Ky.), accused Biden of selling out the elected Afghan government or endangering U.S. security interests by pulling out before circumstances warranted.

Sen. Lindsey O. Graham (R-S.C.) called the withdrawal plan “a disaster in the making.”

On April 14, Sen. Lindsey O. Graham (R-S.C.) spoke out against President Biden’s decision to withdraw all American troops from Afghanistan by Sept. 11. (The Washington Post)

Although Graham was a strong Trump ally, he opposed Trump’s plan to pull out of Afghanistan entirely. Graham supports leaving a small counterterrorism force behind.

“A full withdrawal from Afghanistan is dumber than dirt and devilishly dangerous,” Graham said in a statement. “President Biden will have, in essence, canceled an insurance policy against another 9/11.”

Biden’s approach won support from a range of other quarters, however, including some Republicans like Sen. Ted Cruz (Texas) and some veterans groups.

“Words cannot adequately express how huge this is for troops and military families who have weathered deployment after deployment, with no end in sight, for the better part of two decades,” VoteVets Chairman Jon Soltz said in a statement tweeted by the group.

“The Endless War cheerleaders have been saying for 15 years that if we just stay in Afghanistan a little longer, the Taliban will give up and the Afghan government will get their act together. And they will say it for the next 15 years if we leave our troops there indefinitely,” Sen. Chris Murphy (D-Conn.) tweeted Tuesday.

And Anthony Cordesman, a security analyst at the Center for Strategic and International Studies, wrote Tuesday that a U.S. withdrawal would have “major strategic benefits” at relatively low risk.

“It will be a tragedy, but the time has come for the strategic equivalent of a mercy killing,” Cordesman wrote.