Two people were killed and seven others injured Monday when a 19-year-old gunman opened fire at a high school in St. Louis, Missouri.
The suspected shooter was later gunned down by officers, the city's police commissioner confirmed.
No motive for the violence was immediately apparent, but Police Commissioner Mike Sack told an early evening news conference the assailant may have suffered from mental illness.
Students fleeing from the Central Visual and Performing Arts High School as police arrived on the scene told officers the shooter was armed with a rifle, Sack said.
Police exchanged gunfire with the suspect after storming the school, and he was shot dead, ending the rampage about 15 minutes after the first calls for help came in at about 9:10 a.m., the commissioner said.
The suspect was identified as Orlando Harris, 19, who graduated from high school last year and had no previous criminal history, Sack told reporters.
"There are suspicions that there may have been some mental illness that he was experiencing. We're working on developing that information right now," he said.
A 61-year-old teacher and a 16-year-old girl were killed, Sack said. Four other teenagers suffered gunshot wounds and three more youths sustained other injuries in the pandemonium.
The St. Louis Post-Dispatch newspaper, citing relatives, identified the teacher as Jean Kuczka, who taught health and physical education.
"While on paper we might have nine victims ... we have hundreds of others," Sack said. "Everyone who survived this is going to take home trauma."
The bloodshed marked a rash of U.S. school shootings that have left dozens dead and wounded this year alone. One of the deadliest took place in May when a gunman killed 19 children and two adults in Uvalde, Texas.
Sack declined to say how the suspect in Monday's shooting gained entry to the school, attended by about 380 students, though he said doors to the building had been locked, slowing down his ability to get inside.
The high school had seven security officers on site and metal detectors, a school official told the news conference. The security officers were not armed, according to Sack.
A math teacher, David Williams, told the Post-Dispatch that the school principal alerted staff and students over the public address system with the code phrase for a school shooter. He described hearing multiple shots outside his classroom, adding that a window in his classroom door was shot out.
In the Uvalde rampage in May, police and other law enforcement officers were castigated for waiting more than an hour before confronting the shooter, who was locked inside a pair of adjoining classrooms with students and teachers. The suspect in that case entered the school building through an unlocked door.