This has been updated with the latest polling

Over the past 20 years, Americans’ support for the war in Afghanistan has consistently waned. So much so that despite the Taliban taking over the country in a matter of days this past week — after the United States spent a trillion dollars and thousands of lives to prevent such a thing — very few people are second-guessing the need to withdraw, though many debate how the withdrawal has been executed by the Biden administration.

What did that change in public opinion look like?

Here’s an overview of the support for the war from Gallup, which regularly tracked whether Americans thought invading Afghanistan was a mistake.

You can see that the war started off incredibly popular after 9/11. As the war dragged on, though, more and more people said it was a mistake.

Still, while it might seem like the war in Afghanistan was unpopular for most of the past two decades, it was significantly more popular than the Iraq War for a long time — and even broadly popular, period.

As we pull out of Afghanistan, the public is split on whether our military involvement there was a mistake, but most Americans say it was past time to leave. We have yet to see whether Americans’ opinions will change with the bungled withdrawal and quicker-than-expected Taliban takeover.

Let’s take a closer look at key inflection points in public opinion for the war.

2002: Massive support for the war

At the war’s height in popularity, Gallup found 93 percent of Americans were willing to say that getting militarily involved in Afghanistan was not a mistake. At the time, U.S. and allied forces were having great success, hunting down al-Qaeda militants and rooting the Taliban from power. Both groups were broken up and chased into the mountains.

Then the hard part came: propping up an Afghan government so Americans could leave without simply handing it back to the Taliban. The mission pivoted from rooting out terrorists to nation-building.

That was less satisfying than stamping out the bad guys, and public support for the war fell to 70 percent, then about 60 percent. Democrats started breaking off more so than Republicans, and their support never returned in large numbers.

In 2004, just a few years into the war, 41 percent of Democrats considered the war in Afghanistan to be a mistake, compared with just 9 percent of Republicans, Gallup found. Support for the conflict in Afghanistan would never return to its initial heights, even though the fighting was about to escalate significantly.

Americans okayed military escalations, so long as it was sold to them as temporary with a goal of exiting the war: President Barack Obama’s 2009 surge of 30,000 troops got high marks; 59 percent said they supported it, a CNN poll found.

2010-2014: Public opinion turns sharply against the war despite bin Laden’s death

As the war hit its 10th year, public opinion unequivocally turned against it. The public skepticism tracked with a tumultuous time for the war: Under Obama, the number of U.S. troops in the country hits its highest point: 100,000. Army Sgt. Bowe Bergdahl got captured by the Taliban, which would lead to a high-profile prisoner swap. And American troops came under international criticism for mistreatment of Afghans, including an American soldier allegedly committing a mass shooting of Afghan civilians.

Even after American troops found and killed Osama bin Laden, the al-Qaeda leader who orchestrated the 9/11 attacks, there was no big public rally for the war. Instead, many Americans saw that with bin Laden’s death, there was no reason to be in Afghanistan: A month later, 54 percent of Americans said the war wasn’t worth fighting, a Washington Post-ABC News poll found. A year later, that same survey found 66 percent of Americans opposed to the war.

In the middle of Obama’s administration, in 2011, CBS asked an interesting question: How much longer do you want to stay in the war? Most said they were okay staying just a few years. Only 3 percent said they want to stay another five to 10 years.

But that didn’t mean Americans wanted to pull the plug right then. In 2014, as Obama prematurely announced the U.S. combat mission in Afghanistan was over, a Washington Post-ABC News survey found more people than not wanted to keep about 10,000 troops in Afghanistan “in the years ahead.”

One thing to keep in mind: With the exception of immediately after the 9/11 attacks, there’s evidence that Americans probably didn’t have strong opinions about the Afghanistan War, in part because they may not have been paying close attention to it — the war in Iraq having pulled most of the troops and attention.

2016-on: Americans move to ‘we want out’

The war, however, would never recover its popularity, and Americans would elect leaders to reflect that. In 2016, Donald Trump campaigned and won the presidency on an “America First” platform that included a promise to end U.S. troop involvement in Afghanistan. In 2020, as he campaigned for reelection, Trump entered a deal with the Taliban. Critics, however, said the deal left the United States with no teeth to hold the Taliban to its parts of the bargain, including not to harbor terrorists.

Still, the Taliban deal is one of the few Trump initiatives that President Biden didn’t reverse when he came into office. He, like Obama and Trump, was determined to end the war and probably was aware of polling like this:

The end of the war: Early evidence Americans are still over it

How does Americans’ support (or lack therof) for the nation’s longest war change now that it concludes in such dramatic fashion? We have early evidence that despite the chaos — the U.S. is potentially leaving tens of thousands of Afghan allies behind in a Taliban-controlled country — Americans don’t want to stay there.

Six in 10 Americans say fighting Afghanistan wasn’t worth it, according to a new AP-NORC survey. That’s in line with the number of Americans who say fighting in the less-popular war, Iraq, wasn’t worth it.

And that is welcome news for Biden, who is likely hoping Americans give him a pass on how he handled the withdrawal because they wanted out, too.