Washington has ordered the withdrawal of "non-emergency employees" from Iraq while the commander of Iran's Revolutionary Guards warned of a possible "full-scale confrontation", as tensions between the US and Iran mount.

The US State Department said employees at both the US embassy in Baghdad and its consulate in Erbil, capital of the semi-autonomous Kurdish region, were being withdrawn immediately due to safety concerns.

It was uncertain how many personnel were affected or what the specific threat was, but visa services were suspended at the heavily fortified US missions.