The Trump administration ordered a partial withdrawal of its diplomats from Iraq on Wednesday, as Washington warned of heightened threats from Iran and Tehran-backed Shiite militias.

This week, a U.S. official said Iran likely was behind recent attacks on oil tankers in waters off the United Arab Emirates, something Tehran has strenuously denied. Last week, the administration deployed an aircraft carrier, a bomber task force and other equipment and personnel, citing unspecified threats from Iran.

But...