US embassies in capitals across the Middle East on Saturday (Aug 1) warned their citizens to beware of "unforeseen escalation" in the regional conflict and urged them to be ready to leave.

The warning, posted online by US embassies in Bahrain, Egypt, Iraq, Israel, Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia and the United Arab Emirates, came a day after US President Donald Trump threatened to hit Iran "very hard".

Iran and the United States have been at war since Feb 28. A period of calm followed a ceasefire, though that collapsed with a return of strikes.

With no end in sight, the war has for months upended the lives of people across the Middle East and rattled global energy markets.

"Americans in the region should consider departing, or be prepared to depart should there be escalation," said the security alert.

The messages urged citizens to check flight details and to follow safety advice from local authorities.

"Americans currently in the Middle East should exercise caution and heightened vigilance and should be prepared for flight cancellations, periodic airspace closures, and potential travel disruptions," it said.

US citizens in Jordan were told not to visit military bases in the country, which have recently come under Iranian missile attack, and in Israel they were urged to seek the location of the nearest bomb shelter.

"The Iranian regime is unpredictable, as seen by its recent decisions to attack areas in the region without warning or provocations as well as to expand attacks to areas not previously targeted (such as Egypt)," said a post on the US Embassy Jerusalem site.

The US embassy in Beirut said the mission remained on "ordered departure status", meaning that family members andnon-essential US government personnel were still relocated outside of Lebanon.