The gunman who killed a Missouri high school student and teacher was armed with an AR-15 rifle and more than 600 rounds of ammunition.

Orlando Harris, 19, had magazines strapped to his chest, some in a bag, and other ammunition police found in stairwells outside Central High School for the Visual and Performing Arts in St. Louis.

On Monday, as a result of the shooting, 15-year-old Alexandria Bell, a student, and 61-year-old Zhan Kuchka, a physical education teacher, were killed, and seven other students were injured.

Harris, who graduated last year, was eventually killed in a shootout with police.

He left behind a handwritten note explaining why he had carried out the attack.

In the message, he complained that he had no friends, no family, no girlfriend and was living in isolation, which he described as a “perfect storm for a mass shooting.”

The attack prompted students to barricade doors, huddle in the corners of classrooms, jump from windows and run out of the building in search of safety.

Several people at the school said they heard Harris yell, “You’re all going to die!”

Michael Sack, the police commissioner, urged people to come forward if someone who appears to be suffering or suffering from mental illness starts “talking about acquiring a firearm or harming others”.

Andre Bell, the father of the dead student, called his daughter his “everything”.

“She was joyful, wonderful and just a wonderful person,” he said.

“She was the kind of girl I loved to see and hear.

“No matter how I felt, I could always talk to her and it was okay. That was my baby.”

“It could have been a lot worse”

Abby Kuchka said her mother, Jean, was killed when a gunman burst into her classroom and she stood between him and her students.

“My mother loved children,” said Ms. Kuchka. “She loved her students. I know her students looked up to her as their mom.”

The seven injured students are aged 15 or 16 and are said to be in stable condition.

Police said four suffered gunshot or siege wounds, two had bruises and one had a broken ankle, apparently from jumping from the three-story building.

Harris was armed with nearly a dozen high-capacity 30-round magazines, Mr. Sack said.

“It could have been a lot worse,” he said.

The school shooting is the 40th this year that has resulted in injuries and deaths, according to Education Week, the most for any year since shootings began being tracked in 2018.

The deadly attacks include the shooting at Robb Elementary School in UvaldeTexas, in May, when 19 children and two teachers died.