According to Secretary of state Mike Pompeo, Consulate and Embassy of United States in Baghdad are the target of "periodic attacks from indirect fire positions".
Protests broke out in Basra early this month over alleged corruption and government neglect and later turned into deadly violence in the oil-rich city.
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.
"The ministry regrets the American decision to pull its staff out of Basra", a statement said.
The decision comes after the recent rocket attacks, which according to Pompeo, were meant for the USA consulate in Basra. No US facilities have been hit in the attacks.
The consulate closure is temporary and involves relocating diplomatic personnel. He, however, called the U-S decision suspicious.
In a speech on Tuesday, national security adviser John Bolton promised there would be "hell to pay" if Iran continues to "cross" the us or its allies.
Germany, France, Britain, Russia and China are trying to save the nuclear deal by providing Iran economic relief, adding to tensions between worldwide powers and the United States as it ramps up pressure on Tehran.
France, Britain, Germany, China and Russian Federation have stayed in the pact, vowing to save it despite the restoration of USA sanctions.
Pompeo tweeted Tuesday that Iran-supported militias had launched the attacks, warning, "We'll hold Iran's regime accountable for any attack on our personnel or facilities, and respond swiftly and decisively in defense of American lives".
Basra is home to more than two million people and has witnessed violent protests over the past few weeks as protesters set alight government and political buildings, including the Iranian consulate and the headquarters of an Iran-backed paramilitary force, after a number of people were killed in clashes with police.
Such claims are made while there are numerous overt and covert indications that foreign agents were involved in a recent brutal attack on the Consulate General of the Islamic Republic of Iran in Basra, he noted.