An airman provides security as the sun goes down July 16 at Camp Oqab in Afghanistan. (Master Sgt. Ben Bloker / Air Force)

Related Links

WASHINGTON — As two of the nation’s longest wars finally end, most Americans have concluded that neither achieved its goals.

Those grim assessments in a USA Today/Pew Research Center poll underscore the erosion in support for the invasions of Iraq and Afghanistan and the loss of faith in the outcome of the wars, both launched in the aftermath of the Sept. 11, 2001, terror attacks. The public’s soured attitudes may make it harder the next time a president tries to persuade Americans of the value of military action when it involves putting thousands of U.S. troops in harm’s way.

In the survey:

■ On Iraq, Americans by 52 percent to 37 percent say the United States mostly failed to achieve its goals. That is a decidedly more negative view than in November 2011, when U.S. combat troops withdrew. Then, by 56 percent to 33 percent, those surveyed said the U.S. had mostly succeeded.

■ On Afghanistan, Americans by a nearly identical 52 percent to 38 percent say the U.S. has mostly failed to achieve its goals. In 2011, a month after Osama bin Laden was killed, a majority predicted the war would succeed.

“What is especially interesting about these responses is that the public has continued to update its views on Iraq and Afghanistan despite the fact that these wars have received virtually no attention at all from our politicians over the past couple of years,” said Christopher Gelpi, a political scientist at Ohio State University who has studied attitudes toward the conflicts. “This shows that the public is more attentive to costly wars than we might expect, even when politicians try to ignore the conflicts.”

In recent months, news reports from Iraq have centered on renewed fighting with al-Qaida fighters and a government riven along sectarian lines. In Afghanistan, President Hamid Karzai has resisted American demands to sign a security agreement setting out the U.S. role once combat forces are withdrawn by the end of the year.

Americans continue to distinguish between the two conflicts when it comes to the justification made for using military force.

By 10 percentage points, 51 percent to 41 percent, Americans say the U.S. made the right decision in using military force in Afghanistan, where the Taliban had provided safe haven for the al-Qaida terrorists who planned the 9/11 attacks. Still, that narrow majority does reflect a significant shift in views. In 2006, two-thirds of Americans said invading Afghanistan was the right decision.

But when it comes to Iraq, support for the decision to go to war has crashed. The invasion was launched in March 2003 with Bush administration officials asserting President Saddam Hussein had weapons of mass destruction, though they were never found. At the beginning, Americans by 3-1 called it the right decision.

Now, by 50 percent to 38 percent, they call it the wrong one.

The poll of 1,504 adults taken Jan. 15-19 has a margin of error of +/-3 percentage points.

The biggest shift in attitudes toward the Iraq war came among Republicans and those who lean to the GOP. In 2011, 65 percent of them said the war had succeeded; now just 38 percent do. A double-digit gap between Republican and Democrat views in 2011 has now been largely erased.

There is a difference in partisan attitudes, though. More Republicans say it was right to use military force in Iraq (52 percent) than those who say the war had succeeded (38 percent). But more Democrats say the war succeeded (36 percent) than say it was the right decision to go to war (28 percent).

In his State of the Union speech Tuesday, President Obama — who won the Democratic presidential nomination in 2008 in part because he had opposed the Iraq war — took credit for the drawdown in U.S. combat forces during his tenure.

“When I took office, nearly 180,000 Americans were serving in Iraq and Afghanistan,” Obama said. “Today, all our troops are out of Iraq. More than 60,000 of our troops have already come home from Afghanistan. ... Together with our allies, we will complete our mission there by the end of this year, and America’s longest war will finally be over.”

The most sustained ovation of the evening came when the president paid tribute to Cory Remsburg, an Army Ranger who was seriously wounded during his 10th deployment. He was seated in the House gallery with Michelle Obama.

“As this time of war draws to a close,” Obama said, “a new generation of heroes returns to civilian life.”

In a study of the impact of Afghanistan on the 2012 election, Ohio State’s Gelpi found that the war’s casualties didn’t affect voter choices because Obama and Republican nominee Mitt Romney had similar stances. However, casualties in Afghanistan were linked to lower voter turnout in communities that suffered them.

“We think that the failure of politicians to respond to an issue that voters cared about — the casualties of war — discouraged involvement in the election,” he said.