(Reuters) - Half of all Americans believe that the United States will go to war with Iran “within the next few years,” according to a Reuters/Ipsos public opinion poll released on Tuesday amid increased tensions between the two countries.

FILE PHOTO: A staff member removes the Iranian flag from the stage after a group picture with foreign ministers and representatives of the U.S., Iran, China, Russia, Britain, Germany, France and the European Union during Iran nuclear talks at the Vienna International Center in Vienna, Austria, July 14, 2015. REUTERS/Carlos Barria/File Photo

While Americans are more concerned about Iran as a security threat to the United States now than they were last year, few would be in favor of a pre-emptive attack on the Iranian military. But if Iran attacked U.S. military forces first, four out of five believed the United States should respond militarily in a full or limited way, the May 17-20 poll showed.

Historically tense relations between Washington and Tehran worsened in May after U.S. President Donald Trump hardened his anti-Iran stance and restored all sanctions on Iranian oil exports following his decision a year ago to pull the United States out of a 2015 international nuclear accord with Tehran.

The United States moved an aircraft carrier and forces to the Gulf region in response to intelligence that Iran may be plotting against U.S. interests, an assertion Iran denies.

Nearly half - 49% - of all Americans disapprove of how Republican Trump is handling relations with Iran, the poll found, with 31% saying they strongly disapprove. Overall, 39% approve of Trump’s policy.

The survey showed that 51% of adults felt that the United States and Iran would go to war within the next few years, up 8 percentage points from a similar poll published last June. In this year’s poll, Democrats and Republicans were both more likely to see Iran as a threat and to say war was likely.

Iran was characterized by 53% of adults in the United States as either a “serious” or “imminent” threat, up 6 percentage points from a similar poll from last July. In comparison, 58% of Americans characterized North Korea as a threat and 51% characterized Russia as a threat.

Despite their concerns, 60% of Americans said the United States should not conduct a pre-emptive attack on the Iranian military, while 12% advocate for striking first.

If Iran attacked, however, 79% said that the U.S. military should retaliate: 40% favored a limited response with airstrikes, while 39% favored a full invasion.

Both the United States and Iran have said they do not want war, although there have been bellicose statements from both.

Despite Trump’s decision to withdraw, the poll showed 61% of Americans still supported the 2015 deal between Iran and world powers to curb Iran’s potential pathway to a nuclear bomb in return for sanctions relief. Republicans also favored the accord negotiated by the Democratic administration of President Barack Obama, with a little more than half saying they supported it.

Gulf allies and U.S. government officials have said they believe Iran-backed groups are responsible for a series of attacks on shipping and pipelines in the Gulf in the last week.

Trump has said he would like to negotiate with the Islamic Republic’s leaders. Iranian President Hassan Rouhani rejected talks on Tuesday and has said “economic war” is being waged against Iran.

The Reuters/Ipsos poll was conducted online in English throughout the United States. It gathered responses from 1,007 adults, including 377 Democrats and 313 Republicans, and has a credibility interval, a measure of precision, of 4 percentage points.

To see a copy of the full poll results and methodology, click here: tmsnrt.rs/2WUpjFT