US officials, speaking on condition of anonymity, had privately acknowledged concerns that Trump might attempt to draw in the military to quash dissent.