A former national security spokesperson says President Trump doesn't want to go to war with Iran, but understands the need to stand up to the country which has engaged in a "low-intensity conflict" with the United States for the last 50 years.

Michael Anton weighed in on "America's Newsroom" Wednesday after the State Department ordered non-emergency personnel at the U.S. Embassy and consulate in Iraq to leave the country amid rising tensions between the U.S. and Iran.

Anton said this is "not an insignificant move" and it has two fundamental purposes. The first purpose, Anton said, is to exercise an "abundance of caution."

"If you have intelligence, even if it's uncertain, you don't want to risk the lives and safety of your people," he said.

Secondly, the decision to remove personnel demonstrates to other countries that the United States is paying attention, and is ready to do what's necessary to protect the lives of the American people.

"It sends a message to hostile countries in the region we have a sense of what's going on and that we're going to protect our people," Anton continued. "We're taking action."

COTTON SAYS AMERICA WOULD WIN WAR AGAINST IRAN IN 'TWO STRIKES'

MIKE POMPEO SAID IRAN-BACKED MILITIAS MOVED ROCKETS NEAR AMERICAN BASES IN IRAQ

It was revealed last week that the United States sent two Cold War-era bombers to Iran to assist in the pushback against what has been described as "credible threats" against the U.S. from the country. Following that news, Secretary of State Mike Pompeo declared that Iran-backed forces in Iraq had moved missiles near bases housing American forces.

Ultimately, Anton said, Iran tends to strike when it "senses weakness, indecision or inattention" from United States forces. As tensions continue to rise, a war with Iran appears to be an increasingly plausible response, but Anton said that's the last thing President Trump wants.

CLICK HERE TO GET THE FOX NEWS APP

"The president has said many times not just in this most recent episode but throughout his presidency he doesn't want a war with Iran or a conflict with Iran," he continued.

"Standing up to them is the way to make any further conflict from Iran less likely, which is the president's goal. I think nearly all Americans would agree it's the right goal."