According to an F.B.I. affidavit filed in federal court on July 10 and obtained by The Associated Press, the sergeant, an air traffic controller at Wheeler Army Airfield in Hawaii, described fantasies about killing fellow military members and pledging loyalty to Abu Bakr al-Baghdadi, the leader of the Islamic State.