Concern about a strike and the prospect of retaliation led the United States to withdraw diplomats from Iraq and authorize the voluntary departure of U.S. military family members from the Middle East.