These threats have increased during the past 24 hours with "repeated incidents of indirect fire from elements of those militias directed at our Consulate General in Basrah and our Embassy in Baghdad". It has provided no evidence to support the allegations.
A US diplomatic outpost and major regional airport near the southwest Iraqi city of Basra was the target of a rocket attack early Friday morning, amid continuing violent civil unrest in the oil-rich city.
Secretary of State Mike Pompeo called it a "temporary relocation" in response to what he called "increasing and specific threats" from the Iranian government and militias under its control. At least 15 protesters have been killed in clashes with security forces.
Earlier, the Iranian Foreign Ministry called United States allegations of inciting violence in Basra "astonishing, provocative and irresponsible".
In the past weeks, hundreds of angry demonstrators in Basra burned the provincial government buildings, offices of leading political parties and headquarters of Shia militias in protest against widespread corruption and water contamination in the province.
The decision to temporarily close the U.S. consulate in Basra comes after an attack on a military parade in Iran last weekend that the Islamic Republic blamed on the United States and its regional allies.
Speaking at the General Assembly, Iranian President Hassan Rouhani also dismissed the USA criticism of involvement in its neighbor, questioning why Washington itself was involved in a country so far away.
At the same meeting, National Security Adviser John Bolton joined in the tough talk against Iran: "If you cross us, our allies, or our partners; if you harm our citizens; if you continue to lie, cheat, and deceive, yes, there will indeed be hell to pay", he said.
Iran accuses of the United States of pursuing regime change. The sanctions have pummeled Iran's economy and currency.
Responding to Trump's comments on Wednesday, Iran's President Hassan Rouhani said that the USA is the problem: an isolated violator of worldwide laws led by a team of political and diplomatic novices that is earning the world's disapproval.