When a gunman burst into his high school classroom, Kendrick Castillo did not hesitate.
The 18-year-old immediately charged, pinning the attacker to the wall before he was fatally shot protecting classmates, witnesses said. As Castillo charged, so did two other students. One of them, Brendan Bialy, who has signed up to join the Marines, wrestled the gun from the shooter's hand and the students subdued him.
A second shooter was captured by an armed security guard.
Authorities said these acts of bravery helped minimize the bloodshed from the attack, which also wounded eight people.
U.S. & World
The day's top national and international news.
"We're going to hear about very heroic things that have taken place at the school," Douglas County Sheriff Tony Spurlock said Wednesday.
The attackers were identified by law enforcement officials as 18-year-old Devon Erickson and a 16-year-old student. NBC News is not naming the juvenile suspect at this time. The two allegedly walked into the STEM School Highlands Ranch through an entrance without metal detectors and opened fire in two classrooms.
Because the attack happened only miles from Columbine High School and just weeks after the shooting's 20th anniversary, questions quickly arose about whether it was inspired by the 1999 massacre. But investigators offered no immediate motive.
Castillo sprang into action against the shooter "and immediately was on top of him with complete disregard for his own safety," said Bialy, a close friend.
Distraught dad John Castillo told NBC News he can't fathom how life will go on without his teenage son.
"I don’t know what I’m going to do without him in our lives," John Castillo said. "It’s never going to be the same."
He added: “I don’t know why this happened to such a good kid."
A member of the school's robotics club and a relentless tinkerer, Castillo had an infectious smile and gentle sense of humor, according to friends. He worked part-time at a local manufacturing company that had offered him a job after an internship because he was such a standout employee.
"To find he went down as a hero, I'm not surprised. That's exactly who Kendrick was," said Rachel Short, president of the company, Baccara.
Cecilia Bedard, 19, had known Castillo since elementary school and said he was always friendly, modest and excited to help people. He made a point of always joining his father at Knights of Columbus fundraisers and bingo nights.
"He was amazing," Bedard said. "He was honestly the sweetest kid I ever met. Never said a mean joke."
Bialy smiled as he recounted the struggle with the shooter to reporters, saying that he wanted to focus on the positive. "They completely and utterly failed in a matter of half a minute," he said of the attackers. He added, "What I saw yesterday was the absolute best of people."
Bialy would not identify the third student who helped subdue the gunman but the family of Jason Jones put out a statement saying he was shot twice while disarming one of the attackers.
The security guard who detained the second armed suspect was employed by Boss High Level Protection, a company started by a former SWAT team leader who responded to the Columbine shooting. The owner, Grant Whitus, told The Associated Press the security guard is a former Marine who ran to the area of the shootings and confronted one of the armed students in a hallway.
The guard drew his weapon and apprehended the person, Whitus said.
"He doesn't even realize how many lives he saved by stopping a school shooting," Whitus said.
Both suspects were students at the school, and they were not previously known to authorities, Spurlock said.
Erickson made his first court appearance Wednesday and kept his head down. His black hair, streaked with purple dye, covered his face. The juvenile second attacker was due to appear before the judge immediately afterward. Formal charges were expected to be filed by Friday.
A message left at a phone number listed for Erickson's home was not immediately returned.
Josh Dutton, 18, said he was close friends with Erickson in middle school but had not seen him for four years while attending a different high school. On Sunday, he spotted Erickson at a local light rail station and said he was shocked at how much his friend had changed.
Erickson wore all black and was significantly thinner and did not seem interested in talking.
"He said he'd just turned 18 and he owned rifles," Dutton said.
The shooting took place exactly a week after a gunman killed two students and wounded four at the University of North Carolina-Charlotte. In that case as well, one of the fatalities was a student who charged the attacker.
The Colorado attack unfolded came nearly three weeks after neighboring Littleton marked the anniversary of the Columbine attack that killed 13 people. The two schools are separated by about 7 miles in adjacent communities south of Denver.
Douglas County District Attorney George Brauchler said the community remains resilient in the face of multiple shootings, including Columbine, the 2012 theater shooting in the Denver suburb of Aurora and the 2013 shooting at Arapahoe High School.
The attacks are "aberrant acts" although they might seem otherwise to the rest of the world, he said.
"Who we are is a kind, compassionate, caring people, and this does not define us. It won't today and it won't tomorrow," he said.
Riccardi reported from Denver. Associated Press writers Dan Elliott and Colleen Slevin in Denver and AP researchers Monika Mathur in Washington and Rhonda Shafner in New York contributed to this report.