Civil rights groups and some politicians from both the Democratic and Republican parties accused Trump of politically motivated discrimination, and some senior military officials were caught off guard by the announcement.