Almost half of Americans (49%) think the U.S. has "mostly failed" in Afghanistan, a new Pew Research survey has found.

Expand chart Reproduced from Pew Research Center; Note: Survey question changed in 2014 from "Do you now believe that the U.S. will definitely succeed, probably succeed, probably fail, or definitely fail" to "has mostly succeeded or mostly failed"; Chart: Axios Visuals

Why it matters: Sunday is the 17-year anniversary of the war. Three presidents and billions of dollars later, only about one-third of Americans think the country's longest war has been a success. The country is also divided over whether it was a good idea to use military force at all: 45% say it was — down from 69% in 2005 — while 39% say it was the wrong choice.

Along party lines, more Republicans believe the U.S. has succeeded than Democrats: 66% of Republicans say we've succeeded vs. 31% of Democrats.

The bottom line from South Asia Deputy Director at the Wilson Center, Michael Kugelman: "Given how unpopular this war has become, it’s surprising that figure isn’t higher. Either way, those 49% are spot on: The US has indeed mostly failed in Afghanistan. No matter how you slice it, this war has gone from bad to worse. Little wonder it’s so unpopular."

Go deeper: