HIGHLANDS RANCH, Colo. (AP) - Two high school students shot and killed a classmate and injured eight others at a charter school in a Colorado community that marked the 20th anniversary of one of the nation's worst school shootings just weeks ago.



Douglas County sheriff's officials said Devon Erickson, 18, and a younger student walked into the STEM School Highlands Ranch Tuesday afternoon and opened fire on students in two classrooms, prompting students to run shouting through the halls or to hide out of sight as gunfire echoed through school.



"At the moment no one really knew what was going on so I didn't know they were bullets," said seventh-grader Sophia Marks. "I just kind of saw like flashes and we heard bangs."



Within minutes, deputies at a nearby sheriff's department substation entered the school and arrested the two suspects after a struggle. Both were students at the school and they were not previously known to authorities, Sheriff Tony Spurlock said.



Josh Dutton, 18, told The Associated Press that he was close friends with Devon Erickson in middle school but hadn't seen him for four years as he went to 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, a hat and sunglasses, was significantly skinnier and didn't seem interested in talking. "He said he'd just turned 18 and he owned rifles," Dutton said.



A message left at a phone number listed for Erickson's home was not immediately returned.



The shooting took place exactly a week after a gunman killed two students and wounded four at the University of North Carolina-Charlotte. It also comes nearly three weeks after neighboring Littleton marked the grim 20th anniversary of the Columbine school massacre that killed 13 people. The two schools are separated by about 7 miles (11 kilometers) in adjacent communities south of Denver.



"Tragically, this community and those surrounding it know all too well these hateful and horrible acts of violence," White House spokesman Judd Deere said in a statement. President Donald Trump had been briefed on the shooting and was in touch with state and local officials, Deere said.



"The heart of all Colorado is with the victims and their families," Gov. Jared Polis said in a statement.



STEM is a public charter school with a focus on science, technology, engineering and math. It has more than 1,850 students in kindergarten through 12th grade.



As the gunfire rang out, students ran through the halls shouting "School shooter!" Some wondered at first if it was a joke or a drill.



Chris Elledge, 15, said his teacher told the class to hide behind weight equipment in the room, where they stayed until police arrived.



"They busted in the room, and they were asking if there was any suspects in the room, if we were OK, and they escorted us out to go out to the front of the building," Elledge said.



Frantic parents used their cellphones to find their children as news of the shooting spread. Sophia Marks' mother, Sara Marks, said she has two other children who also go to the school.



"When you have no idea what's going on and the children are texting you that they're hiding under a desk and bullets are hitting their window, or things are hitting their window, it's a horrible feeling," she said.



Three hospitals reported treating eight people in connection with the attack, including two who were listed in serious condition. At least four others were released by Tuesday night.



Fernando Montoya told television station KMGH that his 17-year-old son was shot three times but was expected to make a full recovery.



"Thank God he is fine," Montoya said. "Even though he got shot, he's OK. He's going to walk out on his feet, so I'm glad. We're so lucky."



___



AP writer Nicholas Riccardi contributed to this report.

(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)