The Air Force, like the civilian world, is often ill-equipped to intervene before violence occurs. Though Mr. Kelley’s behavior raised flags, commanders say they have limited options until a crime is committed. Even then, the priority is more often on getting problem troops out of the military, giving little thought to the possible impact on society. After facing intense criticism for its failure to report Mr. Kelley, the Air Force has opened an investigation into the case and many questions remain about what more it could have done.

For Mr. Kelley, the military was likely an encouraging option at first. His family had a tradition of going to Texas A&M University: His grandfather, father and both siblings became Aggies. But growing up in New Braunfels, Tex., Mr. Kelley did not get the grades to attend one of the state’s top schools. Besides earning mostly C’s, he had amassed at least seven suspensions for insubordination, profanity, dishonesty and drugs, according to school records.

Image Devin P. Kelley in a photo from the New Braunfels High School yearbook. He enlisted in the Air Force after graduation.

The Air Force offered him a clean slate and the chance to prove himself. He enlisted right after high school in 2009. Based on above-average aptitude test scores, he was picked to become a fusion analyst — an intelligence specialist trained to interpret and communicate the latest information on enemy tactics. It promised a clear career path and a top-secret clearance.

In spring 2010, after two months of basic training, he arrived at Goodfellow Air Force Base near San Angelo, Tex., for the rigorous six-month intelligence technical school. Graduating required passing a polygraph test and a background check to get a security clearance.

Mr. Kelley washed out before graduation.

The Air Force did not provide details on whether Mr. Kelley passed the required polygraph, which typically scrutinizes mental health, drug use, family issues and disruptive behavior. A military official briefed on Mr. Kelley’s Air Force record said only that he was cut from the school for “academic reasons.”

Several airmen who went through school with Mr. Kelley said in a closed Facebook group viewed by The New York Times that he did not last long. Some remembered him being there only a few weeks.