The suspected gunman in Wednesday’s horrific shooting at a Florida high school displayed a pattern of disturbing behavior and anger issues that got him flagged as a potential threat long before the tragedy that took 17 lives.

Nikolas Cruz, 19, a former student at Marjory Stoneman Douglas High School, had been expelled from the school and did not graduate after causing so much concern that school administrators banned him from campus, according to police. The suspect’s former classmates revealed he had a history of making dark, gun-related jokes and suffered from “a lot of anger management issues.”

“Finding out it was him makes a lot of sense now,” said 19-year-old Jillian Davis, who participated in the U.S. Army Junior Reserve Officers’ Training Corps with Cruz.

According to her, Cruz often joked about shooting people and/or establishments and would frequently talk about having guns and using them. Math teacher Jim Gard said that Cruz had been aggressive toward other students in the past.

“We were told last year that he wasn’t allowed on campus with a backpack on him,” he said. “There were problems with him last year threatening students, and I guess he was asked to leave campus.”

Joe Melita, former head of the Professional Standards & Special Investigative Unit at Broward County Public Schools, indicated that several district security officials knew of Cruz, saying, “They were familiar with who the young man was.”

On Wednesday, Cruz put his disturbing obsessions and fantasies into action when he opened fire on the school with an AR-15 assault weapon and multiple magazines of ammunition, fatally shooting 17 people and injuring over a dozen more. According to U.S. Sen. Bill Nelson, of Florida, Cruz arrived at the school wearing a gas mask and carrying smoke grenades. In order to create chaos and panic, he allegedly pulled the fire alarm, prompting students to begin pouring out of their classrooms and into the hallways.

“There the carnage began,” Nelson said.

Police and emergency vehicles soon swarmed the scene, and Cruz was arrested and taken into custody.