DOUGLAS COUNTY, Colo — The judge said a single Snapchat message played an integral role in her ruling that there is enough evidence for the older of the two suspects in the deadly STEM School Highlands Ranch shooting to stand trial.

Moments before the shooting, Devon Erickson, 19, received a message from his allegedly co-conspirator that read “we have it all planned out,” according to testimony presented during Tuesday and Wednesday’s preliminary hearing.

“Go now,” prosecutors said Erickson responded under his Snapchat username, “Devonkillz.”

Moments later, shots rang out inside of room 107 of the K-12 charter school in unincorporated Douglas County, while a “full” English literature class watched “The Princess Bride.” Kendrick Castillo was killed when he and two other students ran to tackle Erickson. Eight others were injured.

RELATED: Defense argues older suspect in STEM School shooting was not a willing participant in attack

RELATED: School: Private security guard suspected in 'friendly fire' incident wasn't supposed to be armed

“He knew there was going to be a shooting in classroom 107 — he knew there were certain people McKinney wanted to kill,” Slade said.  

Castillo’s parents sat in the front-row of the packed courtroom during the two-day hearing, where Judge Theresa Slade heard the prosecution’s argument for why it believes it has gathered enough evidence for Erickson to stand trial for the 48 counts he has been charged with for the May 7 attack – including two separate counts of first-degree murder.

The courtroom heard new details about what the two suspects said and did before and after the shooting over the course of a full day of testimony from Douglas County Sheriff’s Office Det. Brian Pereira, the lead investigator on the case.

“It’s difficult [to hear],” John Castillo, Kendrick’s father, told the media after the hearing. “It’s important to listen to things for the facts, to hear things.”

He said he has t-shirts honoring his son’s memory inside his car.

“Justice for Kendrick means that the perpetrators of the crime are punished to the full extent,” John Castillo said.  

Erickson’s private defense attorneys argued that he was not a willing participant in the school shooting and that his co-defendant, 16-year-old Alec McKinney, threatened to kill him and his friends if he didn’t help. For the purposes of a preliminary hearing, which favors the prosecution, Slade said she didn’t buy this argument, citing all of the opportunities she said that Erickson had to stop the shooting, but didn’t.

“What did he do to stop this conspiracy?” Slade said. “… the answer is nothing.”

According to Pereira, Erickson received a text from McKinney the evening of May 6 warning of a potential school shooting the next day. He did not tell anyone about what he received and the next day, according to 18th Judicial District Attorney George Brauchler, he warned another friend to avoid the STEM building.

The day of the shooting, Pereira said Erickson picked up McKinney and the pair went to his parent’s house. During interviews with investigators, Erickson said McKinney threatened him with an axe and forced him to open his parent’s gun safe. The pair are accused of stealing four weapons from the inside and spray-painting the wall of Erickson’s parent’s closet.

Snapchat video shown in court shows Erickson apparently opening the safe while McKinney yells “[expletive] open it already" in the background.

Another Snapchat video shows Erickson snorting a line of cocaine while McKinney apparently yells for him to do it. During his closing arguments, Brauchler said both suspects immediately mentioned these two videos, but that their stories about what happened the day of the shooting diverged from that point forward.

Erickson is also accused of pouring gasoline inside of and helping set fire to his mom’s vehicle. According to statements he gave investigators, he claimed this was mainly McKinney’s work, but he did provide the lighter while under a form of duress. Slade said for the purposes of a preliminary hearing, his complicity means he can still face charges.

“It doesn’t matter for the purpose of these charges who did what in your home,” Slade said.

Once the two suspected shooters reached the school, they were seen on surveillance footage shown in court seemingly shaking hands before going their separate ways. Both headed to room 107, with Erickson containing a guitar case that held two guns, according to Pereira. But, once Erickson got to class, he left to go to the nurse’s office, saying he wasn’t feeling well.

RELATED: Affidavit: Security officer shot, wounded student during STEM school attack

RELATED: 1 student killed, 8 others injured when classmates open fire at STEM School Highlands Ranch

RELATED: STEM School Highlands Ranch shooting: 9NEWS coverage of the tragedy

During an interview with investigators, he told them he was planning to ask for help, but didn’t, saying he couldn’t think straight due to the cocaine and he was afraid his co-defendant would shoot other people. Brauchler said Erickson also claimed to have tried to warn his friends to leave the classroom, though there is no evidence of that in his phone records.

“He could have texted someone in another class, he could have texted an adult, he could have texted his parents,” Slade said.

Instead, after leaving the nurses office, prosecutors said Erickson sent a different message.

“Your intent was inferred by your actions, which was, ‘Go now,’” Slade said. “And then, four shots were fired by your gun.”

The FBI has not yet determined who fired which shots inside of the classroom, according to the Brauchler. Erickson claimed during interviews he did not intend to hurt anyone, but Brauchler said during his closing arguments that he fired four times – and would have shot more, had his weapon not malfunctioned.

According to Pereira, Erickson told investigators his role was to guard the door to the classroom while McKinney opened fire. Brauchler said he removed a magnetic strip from the door that locked it from the inside.

“The evidence presented today is that Devon Erickson had a plan, he was part of the plan,” Slade said.

Erickson will continue to be held without bond. He will appear in court for an arraignment at 1:30 p.m. on Dec. 6.

McKinney is slated to appear in court for a preliminary hearing beginning Nov. 14. He is being tried as an adult.

Both of the suspected shooters face 46 separate counts for their roles in the attack, including two counts of first-degree murder, one count of conspiracy to commit first-degree murder, 31 counts of attempted first-degree murder, and charges including arson, burglary, theft, weapons possession, criminal mischief, interference with a school and reckless endangerment.

During a news conference after Erickson’s preliminary hearing, Brauchler said he has not had any discussion about a potential plea agreement with the suspected shooters, who face a mandatory sentence of life in prison for the first-degree murder charges.

SUGGESTED VIDEOS | Local stories from 9NEWS