Majorities of veterans and the general public agree that the US wars in Iraq and Afghanistan weren’t worth fighting, and hold similar views about the ongoing US military campaign in Syria.

The findings come from a new survey of American adults produced by the Pew Research Center. The Iraq war in particular was seen as futile, suggesting that public sentiment is in line with the conclusion of US military strategists who say the biggest beneficiary of the 2003 invasion was Iran.

Though the war in Afghanistan began 18 years ago, public opinion on the issue remains depressingly relevant. US troops are still present in all three theaters, though nowhere near the concentration seen during the height of the US occupation of Iraq. In US president Donald Trump’s White House, one of the architects of the Iraq war, national security adviser John Bolton, is seen pushing the US towards new confrontations with Iran. Congress, meanwhile, is debating whether to finally end the legal authorization for these wars, originally intended to retaliate for the 9/11 attacks and since used to authorize wars in seven countries.

And then there are the 2020 Democratic presidential primaries, where national security policy has taken a back seat to Trump, civil rights, health care and immigration. The legacy of Iraq is sure to arise, since the frontrunner in the polls, former Vice President Joe Biden, was initially a supporter of the war, while many of his rivals were and remain critics. Vermont Senator Bernie Sanders has called on Democrats to make ending “the forever war” a key plank in the party’s platform.

This survey, at least, provides evidence that many Americans are likely to agree with a pessimistic take on US conflicts abroad. Still, there is a significant partisan divide. Republicans are more likely to see the wars as worth US sacrifices, though a majority of Republicans still see both wars as futile. Republican veterans are the only group in the survey to feel that the ongoing conflict in Syria is worth US commitment.

Pew’s researchers also found that a majority of veterans approve of Trump’s work as commander-in-chief of the US military. The researchers told Quartz they had not asked that specific question about any previous president, but noted that in 2011, a survey of veterans and their family members found the same split for then-president Barack Obama, with just 41% of those surveyed disapproving of his military leadership.