Top officials in the Trump administration were dispatched to Capitol Hill on Tuesday to brief lawmakers about escalating tensions with Iran, saying afterward they are focused on trying to deter attacks and avoid war.

The administration sent Secretary of State Mike Pompeo, Acting Secretary of Defense Patrick Shanahan and Joint Chiefs of Staff Chairman Joe Dunford to brief lawmakers in the House and Senate in separate, closed-door sessions.

FORMER CIA DIRECTOR JOHN BRENNAN ON CAPITOL HILL AT DEMOCRATS’ INVITATION FOR IRAN BRIEFING

“Our biggest focus at this point is to prevent Iranian miscalculation,” Shanahan told reporters after the briefing. “We do not want the situation to escalate. This is about deterrence, not about war.”

"Our efforts and our ultimate objective over the past days has been to deter Iran," Pompeo said.

Shanahan said he talked to lawmakers about what the Department of Defense has been doing since May 3, when “we received credible intelligence about threats to our interests in the Middle East and to American forces.”

Shanahan said he’s confident they have deterred attacks against American forces “based on our reposturing of assets.” Over the past several weeks the U.S. has sent an aircraft carrier and other resources to the Persian Gulf region, and evacuated nonessential personnel from Iraq, amid unspecified threats the administration says are linked to Iran.

"The action taken by the administration is totally appropriate," said Utah Republican Sen. Mitt Romney, saying it was designed to deter attacks by Iran.

Speaking of the threats, Romney said, "They were specific."

Other lawmakers, after the briefing, still expressed concern about war breaking out.

“We were lied to in terms of Iraq supposedly having weapons of mass destruction," said Vermont Sen. Bernie Sanders, a 2020 Democratic presidential candidate. "A war with Iran would be an absolute disaster, far worse than the war with Iraq. I hope the people tell this administration that we will not go to war in Iran.”

Meanwhile, former CIA irector John Brennan also visited Capitol Hill Tuesday after congressional Democrats invited him to give them their own briefing on the situation in Iran during their private weekly caucus meeting. Democrats also invited former State Department official and top negotiator of the Iran nuclear deal, Wendy Sherman, to join Brennan in the briefing.

The competing closed-door sessions come after weeks of escalating tensions in the Persian Gulf that have raised alarms over a possible military confrontation with Iran.

Lawmakers are warning the Trump administration it cannot take the country into war without approval from Congress, and the back-to-back briefings show the wariness among Democrats, and some Republicans, over the White House’s sudden policy shifts in the Middle East.

Trump, veering between bombast and conciliation in his quest to contain Iran, threatened Monday to meet provocations by Iran with “great force,” but also said he’s willing to negotiate.

“We’ll see what happens,” Trump told reporters Monday as he left the White House for a campaign rally. He said Iran has been “very hostile.”

Trump said while there are no talks with Iran he still wants to hear from them, “if they’re ready.”

Fox News’ Chad Pergram, Jason Donner and Brooke Singman and The Associated Press contributed to this report.