Updated at 8:06 p.m. ET
A day after the shooting at STEM School Highlands Ranch in Colorado, local officials urged people not to view such attacks as part of life in Colorado.
"These are aberrant acts," 18th Judicial District Attorney George Brauchler said.
This week's attack happened not long after the 20th anniversary of the school shooting in nearby Columbine. The shooting injured eight people and left one student dead. Police say he has been identified by the Douglas County coroner as Kendrick Ray Castillo, 18.
He was days away from graduating. "That student was going to graduate and would have been out of school in three days," Douglas County Sheriff Tony Spurlock said at a news conference Wednesday.
Castillo's parents told ABC News that their son was active on the school's robotics team and had recently gone to his first prom.
Brendan Bialy, another student at the school, said he fought back against the shooter with Castillo and a third student.
Bialy's father told The New York Times that his son was sitting in class when two students entered the room. One took a gun out of a guitar case before Bialy and his friends attempted to take the shooter down.
Bialy is a high school senior enrolled in the Marine Corps Delayed Entry Program.
"Brendan's courage and commitment to swiftly ending this tragic incident at the risk of his own safety is admirable and inspiring," Capt. Michael Maggitti of the 8th Marine Corps District said in a statement. "His decisive actions resulted in the safety and protection of his teachers and fellow classmates."
Two students are under arrest — one has been identified as 18-year-old Devon Erickson and the other is a juvenile. Erickson faced a court hearing Wednesday afternoon, when he was expected to be assigned an attorney, Spurlock said.
STEM School student Nui Giasolli tells the Today show that she and Castillo were in their British literature class when one student entered late, closed the door, pulled out a gun and ordered everyone not to move.
Castillo lunged to tackle him, she said, "giving all of us enough time to get underneath our desks, to get ourselves safe, and to run across the room, to escape."
Giasolli also said she is thankful that several students acted together "to bring [the gunman] down."
Spurlock said that he has verified accounts of at least one confrontation with the attackers and that he expects to "hear about very heroic things that have taken place" at the school.
The violence in the suburb south of Denver came just weeks after nearby Columbine marked the 20th anniversary of its own horrendous attack, prompting a reporter at Wednesday's news conference to mention Columbine and other high-profile shootings and ask "what this says about our state."
The first response to that question came from Colorado Gov. Jared Polis, who said, "We've been no stranger to tragedy," adding that the people of Colorado have shown they're resilient in the face of catastrophes and deadly shootings.
"This is not who we are," said Brauchler, who was also the prosecutor in the 2012 movie theater shootings in Aurora, Colo. He said he agrees with the governor — but that he's also concerned the violence could come to define the region for the rest of the country.
"Who we are is, we are a kind, compassionate, caring people," Brauchler said, "and this does not define us. It won't today. It won't tomorrow.
"These are aberrant acts. The problem is, when you get three, four or five of them within a 20-mile radius, you begin to think they're less aberrant. But I'm here to tell you, this is not who we are. Our school district is awesome, our school district is safe. My kids are going to go to school today, and I recommend everyone else send their kids to school, too."
Describing public reaction to the attack, Polis said, "At this point, I think Coloradans are really heartbroken, frustrated, still shocked and, frankly, sick over a mass shooting occurring right here in Douglas County."
"Schools should really be places where students can learn and grow — safe places," the governor said. "You shouldn't have to worry about being marched out or being airlifted to hospitals or even losing one's life."
Polis also thanked first responders, who he said "prevented an even worse tragedy from unfolding."
Brauchler said his office is still weighing whether the younger suspect will be charged as an adult.
The attack sparked a lockdown at the large STEM School, which has 1,800 students in kindergarten through 12th grade. The suspects apparently entered the campus through the middle school area, Spurlock said. The school does not have metal detectors, he said.
After the shooting started in two classrooms, students tried to run and hide or take shelter in their assigned positions, as member station Colorado Public Radio reports:
" 'First, we heard the middle school lockdown, which was sort of weird, because we didn't know what was happening,' said fifth-grader Senya Kandawala. 'And then... then we heard our lockdown.'
"Students in his classroom rushed into a corner like they've drilled in the past and wondered what was happening. Kandawala said he later heard law enforcement shouting 'put your hands up, drop your weapon' and that stuff."
The two suspects were taken into custody separately at the school; one of them had already been restrained, by the school's armed security officer, when deputies arrived, Spurlock said.
"Pistols were used in this assault," Spurlock said. He added that there were two firearms used and that those weapons are still being traced.
The suspects were not injured, the sheriff said, adding, "We did not exchange any gunfire with them."
Spurlock confirmed that a car that had been sprayed with graffiti had been taken from one of the suspects' homes.
"The graffiti on it is still being analyzed at this point," he said, adding that he didn't have details about "what it means or where it came from."
After the shooting, the police initially said two male suspects were in custody. Authorities later described one juvenile suspect as female, but the lawyer for the alleged shooter clarified that the juvenile identifies as male and uses male pronouns.
NPR is not identifying the suspect.
"You have to understand that this individual is a young person," Spurlock said, "This individual is a small young person, and the identity wasn't definitively obvious to us when they were taken into custody."
Officials also said it was too early to assign a particular motive for the attack at the school.
"Neither one of them were of legal age to own or purchase a gun," Spurlock said, when asked whether any "red flag" laws might have helped prevent the tragedy.
He urged students and others to use local or state tip lines to contact authorities if they notice anything that might indicate a violent threat, to help prevent similar attacks in the future.
President Trump said on Twitter that the nation was grieving "the unspeakable violence that took a precious young life and badly injured others in Colorado."