At 2:19 p.m. on Wednesday, 19-year-old Nikolas Cruz walked into the high school from which he'd been expelled the previous year and opened fire on students and faculty with an AR-15 he purchased legally a few months earlier. Before escaping by blending in with students evacuating the campus, Cruz had murdered 17 people. He was apprehended less than two hours later in a nearby neighborhood, where he was found in a state of "labored breathing" intense enough to warrant sending him to the hospital before police interrogated him. His heinous crime was the third worst school shooting in the country's history.

As more details have emerged, the nation is left asking if this could have been prevented. Should we require armed security at all schools? Are there any sensible gun laws that could have actually prevented Cruz from purchasing the rifle? And were there any warning signs that could have alerted friends, family and/or authorities about the threat Cruz posed? The answer to the latter is, yes, there were several. Below is a list of six warning signs, in no particular order, that Cruz was on a path to violence.

1. He struggled with mental illness.

According to authorities, Cruz had sought treatment at a mental health clinic but appears to have cut off contact about a year before carrying out the massacre. Broward Mayor Beam Furr told CNN that Cruz had been a patient of a clinic previously but "had not been back to the clinic for over a year."

"I don’t know if he was exactly on law enforcement radar, but it wasn’t like there wasn’t concerns for him," said Furr. Barbara Kumbatovich, a former sister-in-law of Cruz's recently-deceased adoptive mother, told reporters that she believed Cruz had been on medication to deal with his "emotional issues."

At Cruz's hearing on Thursday, his defense team said he suffers from a form of autism and struggled with deep depression, while lacking the stability and support those who suffer from such issues need. "When your brain is not fully developed, you don't know how to deal with these things," said public defender Melisa McNeil, who at one point during the hearing put her arm around Cruz to try to comfort him. "The child is deeply troubled and he has endured significant trauma that stems from the loss of his mother," said attorney Gordon Weeks.

After the hearing, McNeill and Weeks described Cruz as a "broken human being" and revealed that he was on "suicide watch" and in a state of deep remorse. "He's mournful. He's remorseful. He is fully aware of what is going on, and he's just a broken human being," said McNeill.

2. He was expelled from school for violent and threatening behavior.

Cruz was expelled last year from Stoneman Douglas High School for "disciplinary reasons" that have not been fully disclosed but appear to be connected to fighting and threatening behavior. Former teachers and classmates have suggested to reporters that the expulsion was at least partly connected to Cruz "fighting" with the boyfriend of his ex-girlfriend as well as an incident in which he allegedly brought bullets to school in his backpack.

“We were told last year that he wasn’t allowed on campus with a backpack on him,” Cruz's former math teacher Jim Gard told the Miami Herald. "There were problems with him last year threatening students, and I guess he was asked to leave campus." Former classmate Joshua Charo, 16, told the Herald that Cruz was suspended for fighting and the alarming backpack incident.

3. He was perceived by his peers as a threat.

Charo and several other of Cruz's peers said they were unsurprised by his actions because of his troubling behavior, which was "ignored by all the adults." "All he would talk about is guns, knives and hunting," said Charo. "I can't say I was shocked. From past experiences, he seemed like the kind of kid who would do something like this." Cruz, said Charo, "used to tell me he would shoot rats with his BB gun and he wanted this kind of gun, and how he liked to always shoot for practice."

His peers generally describe him as a "loner" who was emotionally unstable. "He used to have weird, random outbursts, cursing at teachers," said Drew Fairchild, who was in one of Cruz's classes freshman year. "He was a troubled kid." One student's parent told the Herald that Cruz was a prime candidate to go on a shooting spree. "If you were to pick one person you might predict in the future would shoot up a school or do this, it would be this kid," said the parent.

"A lot of people were saying it was going to be him," student Matthew Walker told local news outlet WFOR-TV. "A lot of kids threw jokes around saying that he was going to be the one to shoot up the school. It turns out that everyone predicted it. ... He was going class to class just shooting at random kids. Everything he posts is about weapons. It's sick."

4. He allegedly stalked and threatened girls.

In addition to being expelled in part for allegedly fighting with his ex-girlfriend's new boyfriend, Cruz appears to have had an unhealthy obsession with another female student. Cruz's former math teacher Gard told the New York Times that his former student had been fixated on a girl "to the point of stalking her." A female student, Victoria Olvera, said Cruz had been abusive to one of his girlfriends. Student Dakota Mutchler said Cruz had started "threatening" a girlfriend. "He started going after one of my friends, threatening her, and I cut him off from there," said Mutchler.

5. He posted disturbing content and claims on social media.

Cruz’s social media posts were filled with disturbing comment and content, including one statement that resulted in the FBI investigating him in September 2017. In response to a vlogger's YouTube video, Cruz wrote, "I'm going to be a professional school shooter." The vlogger notified the FBI, who personally interviewed him the next day but were unable to track down Cruz. (UPDATE: Another informant warned the FBI in January about the threat Cruz posed, yet, again, the FBI did not take adequate action.)

Other disturbing comments he posted on social media are statements including: "I whana shoot people with my AR-15 (sic)"; "I wanna die Fighting killing shit ton of people"; and “I am going to kill law enforcement one day they go after the good people." The Miami Herald describes his now shut-down Instagram page as including images in which he wore "dark bandanas over his face" and "wielded knives between his fingers as though they were claws." One image showed him with a small black handgun, with the comment, "Pistol fun a-- f--k."

At least one post appeared to suggest some anti-Islam sentiment. Some initial reports indicated that Cruz was a part of a white supremacist group, but law enforcement says that so far they have been unable to confirm the claim.

6. He experienced recent traumatic circumstances at home.

Cruz and his brother were adopted but ended up losing both of their adoptive parents. Most traumatic for Cruz, according to his defense attorneys, was the loss of his adoptive mother, Lynda Cruz. Lynda's husband, Roger, died of a heart attack over a decade ago, leaving her to try to raise the two boys on her own. Lynda's former sister-in-law Barbara said she "did the best she could." The boys, she said, "had some emotional issues," and Lynda "was struggling with Nikolas the last couple years."

Lynda died of pneumonia last November at age 68. According to those who knew Cruz and the family, she was the only person he felt close to. The boys were left in Kumbatovich's custody, but Cruz appears to have been living with a friend's family at the time of the shooting. "He worked at a dollar store and went to a school for at-risk youth, said Fort Lauderdale attorney Jim Lewis, who is representing the family," the Daily Mail reports.

Sources: Miami Herald, New York Times, Daily Mail, CNN, Daily Wire, Sun-Sentinel, Heavy, CNN

Related: Informant Warned FBI About Parkland Shooter's Desire To Shoot Up School, FBI IGNORED IT