Pompeo cites 'increasing and specific threats' for closing US consulate in Iraq The closure was due to increased threats from Iran and militias, Pompeo said.

The U.S. is temporarily closing its consulate in Basra, Iraq, citing "increasing and specific threats and incitement to attack our personnel and facilities" by Iran, according to Secretary of State Mike Pompeo. He warned the U.S. would "respond promptly and appropriately" to any such attack.

The move comes amid a rise in sharp rhetoric between the U.S. and Iran in recent days, with National Security Advisor John Bolton warning this week, "We are watching, and we will come after you. ... There will indeed be hell to pay."

While the State Department has warned of "life-threatening rocket attacks" on U.S. facilities in Iraq in the last few weeks, it has promised to act "swiftly and decisively" against Iran for any damage to U.S. personnel or facilities by local militias backed by Iran — leading to some fears of a potentially dangerous escalation.

The consulate closure is "temporary," Pompeo said in a statement. But the decision to do so was also made hastily on Friday, according to a U.S. official — which could indicate decisive new intelligence of an imminent threat.

"The reason they would close a post like our consulate in Basra is because they have a specific kind of security problem, some kind of security threat which would compel them to close," said Amb. Robert Ford, the former deputy ambassador to Iraq and the last U.S. ambassador to neighboring Syria.

Basra, an oil-rich city in southeastern Iraq and its main port, has been rocked by protests for weeks over corruption and poor social services, like polluted water that has sickened thousands. But the demonstrators have focused their ire, in part, on Iran and those militias, blaming their influence on Iraq's politics and attacking the Iranian consulate weeks ago.

The last month has seen a handful of rocket attacks near the consulate, but that is not uncommon in Iraq, where the security situation remains difficult.

"I wouldn't think that the rocketing per se would be a reason" to withdraw U.S. personnel, Amb. Ryan Crocker, former ambassador to Iraq and several other countries, told ABC News. "We got rockets dropped on our head every other week up in Baghdad when I was there. You marched on, absent any indication you're being deliberately targeted."

It's not entirely clear if the consulate has been targeted, but the administration says it has been along with the U.S. embassy in Baghdad, blaming Iranian-backed militias.

There was a barrage of rockets that hit the Basra airport, which houses the U.S. consulate, on Sept. 7. But State Department officials told ABC News at the time that the consulate was not threatened.

On Thursday, a rocket landed about a kilometer away from the U.S. compound. Again, a State Department official told ABC News that the consulate "has not been impacted."

The consulate is situated with lots of open land around it, making it easier to detect approaching assailants and defend the compound, according to diplomats who have served there. But rocket attacks, long a challenge in Iraq, are more difficult to defend against.

"I can't second-guess Secretary Pompeo on this one. The intelligence must have indicated a critical level of threat against our personnel for him to have made this decision," said Amb. Barbara Leaf, who retired as U.S. ambassador to the United Arab Emirates earlier this year, in an email.

But Leaf, who also served as deputy assistant secretary of state for Iraq and directed the U.S. Provincial Reconstruction Team in Basra, added, "Our diplomats stayed in Basra throughout terrible years of violence from 2003 on. I do hope and expect that the administration will look to return a diplomatic presence to Basra as soon as possible."

Security for the consulate costs over $100 million a year, according to the American Foreign Service Association.

ABC News' Luis Martinez contributed reporting from the Pentagon.