Strong majorities of American veterans and the general public say the wars in Afghanistan and Iraq weren't worth fighting, according to a new poll.

A Pew Research Center survey found 64% of veterans said Iraq wasn't worth fighting, along with 58% who said the same about Afghanistan.

Comparatively, 62% of US adults said Iraq wasn't worth it along with 59% who expressed the same view on Afghanistan.

Nearly 18 years after the war in Afghanistan began, the US military is still present in the country, the conflict is ongoing, and American service members are still dying.

The US military also has an ongoing presence in Iraq roughly 16 years after invading.

In recent weeks, the US has flexed its military muscles at Iran in a standoff that has sparked fears of a new conflict in the Middle East.

Polling suggests the US public would support military action against Iran under the right circumstances.

Visit Business Insider's homepage for more stories.

The US government's so-called war on terror is nearly two decades old, and strong majorities of US veterans and the general public do not approve of its biggest efforts — the wars in Iraq and Afghanistan — according to a new poll from Pew Research Center.

The survey found 64% of veterans said Iraq wasn't worth fighting, along with 58% who said the same about Afghanistan.

Meanwhile, 62% of US adults said Iraq wasn't worth it, along with 59% who expressed the same view on Afghanistan.

Most veterans (52%) and US adults (58%) also said the US military campaign in Syria has not been worth it.

The US invaded Afghanistan in October 2001 following the terror attacks on September 11, 2001. Almost 18 years later, the US military is still present in the country and American service members are still dying there.

Indeed, though the US declared an end to combat operations in Afghanistan in 2014, the fight there is ongoing.

Read more: America's 'war on terror' has cost the US nearly $6 trillion and killed roughly half a million people, and there's no end in sight

Roughly 14,000 US troops are still in Afghanistan as the Trump administration pushes for peace talks between the Taliban and the Afghan government. It's estimated the Taliban now controls or contests roughly 61% of the country's districts, and the Islamic State group — also known as ISIS — has gained a strong foothold in the country.

But Afghanistan remains a country consumed by conflict and violence, which helps explain why it was recently ranked the least peaceful country in the world — replacing Syria — in the 2019 Global Peace Index report.

At least 10 US soldiers have been killed in Afghanistan in 2019 in a war that's claimed the lives of over 2,400 Americans.

There are also currently about 5,200 US troops in Iraq, who are training Iraq forces amid fears of a resurgence of ISIS.

The US ended combat operations in Iraq in 2010 and withdrew most of its troops by the end of 2011, but has maintained a presence there since. The US military's activities in Iraq ramped up significantly there since 2014, when the first air strike against ISIS was conducted.

The US also maintains a presence in Syria, where it conducted operations against ISIS, despite President Donald Trump's professed desire to withdraw all 2,000 troops stained there back in December — a move that prompted the resignation of James Mattis as defense secretary. It's not clear how many troops remain there, but some reports place the number around 400.

When the wars in Afghanistan and Iraq began, polling showed most Americans were in favor of them. Much has changed in the time since, but the "war on terror" rages on for new generations of Americans to fight in multiple parts of the world.

The US launched the war in Afghanistan on 2001 on the grounds the Taliban had harbored Al Qaeda training camps, and is now in talks to withdraw from the war on the condition the Taliban no longer shelters terrorists capable of striking the US or its allies.

In recent weeks, the US has flexed its military muscles at Iran in a standoff that has sparked fears of a new conflict in the Middle East. The Trump administration sent a number of military assets to the region, including an aircraft carrier strike group and more troops, in response to the tensions.

After Iran shot down a US Navy drone last month, the president nearly responded with a military strike. The situation has only become more contentious in the days since.

A Reuters/Ipsos public opinion poll released in May found about half of US adults believe the US will be at war with Iran "within the next few years."

The poll also found 60% of Americans would oppose a preemptive strike against Iran, but a strong majority (79%) said the US should retaliate if attacked — 40% expressed support for a limited response involving airstrikes while 39% said they'd back a full-scale invasion.

Despite the fact most Americans don't look back on Iraq or Afghanistan with approving eyes, it seems they're not necessarily opposed to military action against another majority-Muslim country.