The United States and Iran said Tuesday they were not seeking war with each other as tensions simmered between the two in the Persian Gulf and President Donald Trump vowed the U.S. would respond to any attack.

"We have a lot of things going with Iran," Trump told reporters as he left the White House for a campaign event in Florida. "We'll see what happens. Let me just say this: We are very prepared."

Trump's comments came just hours after he announced the sudden departure of acting Pentagon chief Patrick Shanahan, jolting the Defense Department only a day after he signed off on sending an additional 1,000 troops to the Middle East to counter Iran.

On a visit Tuesday to U.S. Central Command in Florida, Secretary of State Mike Pompeo said he was confident the U.S. is taking the necessary steps to confront any challenge from Iran. He said the military is ready to respond to any attack by Iran on U.S. interests or Iranian disruption of international shipping lanes through which much of the world's oil supplies flow.

Pompeo said Trump only wants to reestablish a deterrent to Iranian threats.

"President Trump does not want war, and we will continue to communicate that message, while doing the things that are necessary to protect American interests in the region," he told reporters.

Pompeo said he made the trip to meet with commanders who would be responsible for any operations in the Gulf to ensure that America's diplomatic and military efforts are coordinated "to make sure that we're in the position to do the right thing."

The "right thing," he said, "is to continue to work to convince the Islamic Republic of Iran that we are serious and to deter them from further aggression in the region."

Similarly measured sentiments of resolve came from Iran, where President Hassan Rouhani said, "We do not wage war with any nation," but Iranians will withstand mounting U.S. pressure and prevail in the brinksmanship.

Iran announced on Monday that it could soon start enriching uranium to just a step away from weapons-grade levels, a challenge to Trump's assurances to allies that the U.S. withdrawal from the deal last year made the world safer.

The Pentagon responded by ordering the additional troops to the region, including security forces for added surveillance and intelligence-gathering.

The U.S. accuses Iran of attacking two tankers near the Persian Gulf; the Iranians deny responsibility. With details murky and no one owning up to the attacks, the Pentagon released new photos intended to bolster its case.

In Congress, some lawmakers expressed worry that the gradual buildup of U.S. troops in the Middle East could become a slippery slope.

"We expect the administration to seek authorization (from Congress) prior to any deployment of forces into hostilities or areas where hostilities with Iran are imminent," said a statement from a bipartisan group of senators led by Democrat Tim Kaine of Virginia and Republican Mike Lee of Utah.

Yet some Republicans argued that rising tensions necessitate a more forceful response from the White House. "You can't have provocative acts by a rogue regime go unanswered," Sen. Lindsey Graham of South Carolina said, adding that he doesn't believe the president would need to come to Congress before striking Iran. Sen. Tom Cotton of Arkansas said he favored a "retaliatory military strike."

In announcing the new deployment before he resigned, Shanahan said the forces are "for defensive purposes to address air, naval, and ground-based threats" in the Mideast.

"The United States does not seek conflict with Iran," Shanahan said, describing the move as intended "to ensure the safety and welfare of our military personnel working throughout the region and to protect our national interests." He said the U.S. will continue to adjust troop levels as needed.

Shanahan abruptly stepped down Tuesday before his formal nomination ever went to the Senate, citing a "painful" family situation. Trump said Army Secretary Mark Esper would be the new acting Pentagon chief.

___

Associated Press writer Susannah George contributed to this report.