BUFFALO, N.Y. — A civil rights advocate, a deacon and a heroic security guard were among the shooting victims of a Saturday attack by a teen gunman who previously had threatened a shooting at his high school.

Buffalo police have released the identities of the 10 people who died in the shooting, among them a security guard hailed as a “hero” for trying to stop the gunman at the Tops Friendly Markets store. Their ages range from 32 to 86 years old. 

The suspect was identified by authorities as Payton Gendron, 18, of Conklin, New York, about 200 miles east of Buffalo. Gendron would have continued his rampage if he had not been stopped by officers outside the store, Buffalo Commissioner Joseph Gramaglia told ABC News on Monday. 

“We have uncovered information that if he escaped the supermarket, he had plans to continue his attack,” Gramaglia told ABC News. “He had plans to continue driving down Jefferson Ave to shoot more black people … possibly go to another store (or) location.”

 ‘This is the heart of the Black community’:Buffalo shooting rattles close-knit neighborhood

Here’s what we know:

Previous threat led to mental health treatment

Gendron had threatened a shooting at Susquehanna Valley High School last year and was sent for mental health treatment, USA TODAY confirmed on Sunday. 

New York State Police said troopers were called to the school on June 8, 2021, for a report that a 17-year-old student had made threatening statements. Police said the student was taken into custody under a state mental health law and taken to a hospital for an evaluation. The police statement did not give the student’s name.

Gendron graduated from the school in Conklin, about 10 miles southeast of Binghamton near the New York-Pennsylvania border.

Assault-style rifle had been illegally modified

The gun was purchased at Vintage Firearms, a collectible firearms and ammunition store in Endicott, Broome County, about 20 minutes from the gunman’s hometown.