The withdrawal of some US personnel underscores escalating tensions as Iran warns of retaliation and Washington weighs possible military action.