An Iraqi protester gestures in front of the burning Iranian Consulate in Basra on Sept. 7. (Essam al-Sudani/Reuters)

Secretary of State Mike Pompeo ordered the evacuation of U.S. diplomats stationed at the U.S. Consulate in the Iraqi city of Basra on Friday, citing “threats to our personnel and facilities” from Iran and its proxies.

The closure of the consulate, one of three U.S. posts in the country, follows at least two rocket attacks apparently targeting the U.S. Embassy in Baghdad and the mission in Basra this month. While the rockets landed harmlessly, away from the facilities, they underscored heightening tensions between Washington and Tehran as Iraq tries to form a new government.

“Given the increasing and specific threats and incitement to attack our personnel and facilities in Iraq, I have directed that an appropriate temporary relocation of diplomatic personnel in Iraq take place,” Pompeo said as he held a flurry of meetings with foreign counterparts in New York on the sidelines of the U.N. General Assembly.

All week, U.S. officials have issued increasingly ominous warnings to Iran that the United States will respond aggressively to any perceived threats to its interests in the Middle East. In a speech Tuesday, national security adviser John Bolton promised there would be “hell to pay” if Iran continues to “cross” the United States or its allies.

The saber rattling comes as the U.S. Treasury Department prepares to implement a new round of economic sanctions in November targeting Iran’s oil sector.

In Iraq, top envoys for the United States and Iran have been competing to place allies in the key positions of parliament speaker, president and prime minister. But since the national elections in May, neither country has been able to whip up enough support to fill the posts. Mohamed al-Halbousi, who was selected to serve as speaker of parliament, has shown a willingness to work with both parties, but his ascension came at the expense of the U.S. favorite.

The race between Iran and the United States to shape Iraq’s next government has rankled many Iraqis, who see it as inappropriate meddling in Iraq’s affairs and a dangerous byproduct of Washington’s campaign to isolate Tehran politically and economically.

A senior Iraqi security official, who spoke on the condition of anonymity because he was not authorized to talk publicly, said the decision to close the consulate in Basra did not appear driven by any credible threat from Iran or the militias it supports.

“We are not aware of any intention by Iran or its friends in Iraq to attack American diplomats or the consulate,” the official said. “This is another unfortunate move that is making Iraq the playground for America’s quarrel with Iran.”

Since July, Basra has been the epicenter of a popular protest movement over government corruption and the lack of basic services. At times, the demonstrations have turned violent and taken on geopolitical dimensions. Protesters have torched government buildings and the Iranian Consulate there, while chanting against what they called Iran’s disproportionate influence over Iraq’s domestic affairs.

Abu Mahdi al-Mohandes, the deputy commander of Iraq’s coalition of armed militias — many of which are backed by Iran — blamed the attack on the Iranian Consulate on saboteurs who he claimed were supported by the U.S. Consulate.

But those tensions eased in recent weeks as Iraqi politicians bore down on accelerating the government formation process amid the pressure from Basra’s protest movement.

In his statement Friday, Pompeo said the United States is working with the Iraqi government to address Iranian threats.

“We look to all international parties interested in peace and stability in Iraq and the region to reinforce our message to Iran regarding the unacceptability of their behavior,” he said.