Mr. Crumbley fired more than 30 rounds as terrified students raced for safety and locked themselves inside classroom doors barricaded by desks, the authorities said. He still had 18 rounds in his possession when he was apprehended, they said.
The toll of the shooting grew on Wednesday after a fourth student, Justin Shilling, 17, died at about 10 a.m. at McLaren Oakland Hospital in Pontiac, Mich., according to the sheriff’s office.
The other students killed were Hana St. Juliana, 14; Madisyn Baldwin, 17; and Tate Myre, 16, who died in a sheriff’s squad car while on the way to a hospital.
At least two of the injured students, who officials said ranged in age from 14 to 17, remained in critical condition. A teacher, the only wounded adult, was discharged from a hospital on Tuesday.
The Oakland County prosecutor, Karen D. McDonald, acknowledged that her decision to charge the suspect with terrorism was not typical for a mass shooting prosecution, but she said it reflected the wider trauma suffered by the hundreds of students who fled gunshots, hid under their desks and will be haunted for years.
“Those are victims too, and so are their families and so is the community,” she said. “The charge of terrorism reflects that.”
Ms. McDonald, an elected Democrat, said she hoped the shooting would prompt changes in Michigan’s gun laws, expressing exasperation that her community had become the latest to be devastated by a deadly school shooting. There have been 29 shootings on school property this year, most of them without fatalities, according to a tally by Education Week.