The shift comes in reaction to the growing possibility of a military confrontation between the United States and Iran.