The teenager who allegedly used a shotgun and a revolver to kill 10 people at his high school in Texas spared the people he liked during the rampage, it has emerged.

Suspect Dimitrios Pagourtzis, 17, has cooperated with police, Galveston County Magistrate Mark Henry said. Pagourtzis told an investigator he acted alone and spared people he liked because he wanted his story told. He was held without bail and is accused of capital murder of multiple people and aggravated assault on a public servant. Nine students and one teacher were killed. At least 10 people were injured.

Pagourtzis said little during a video court appearance answering, “Yes, sir,” when asked whether he wanted a court-appointed attorney. He was not asked to enter a plea, and bond was denied.

The gunfire at Santa Fe High School, not far from Houston in southeastern Texas, started Friday morning. The alleged shooter used a shotgun and a .38 revolver legally owned by his father. Gunfire erupted at the school not long after classes began around 7:30 a.m. local time, officials said.

Two school resource officers confronted the shooter. Authorities later found explosive devices - including pipe bombs and pressure cookers - in and near the school.