PARKLAND, Fla. (AP) — A former student opened fire with a semi-automatic rifle at a Florida high school Wednesday, killing at least 17 people and sending hundreds of students fleeing into the streets in the nation’s deadliest school shooting since a gunman attacked an elementary school in Newtown, Connecticut.
The shooter, who was equipped with a gas mask and smoke grenades, set off a fire alarm to draw students out of classrooms shortly before the day ended at one of the state’s largest schools, officials said.
Authorities offered no immediate details on the 19-year-old suspect or any possible motive, except to say that he had been kicked out of Marjory Stoneman Douglas High School, which has about 3,000 students.
Students who knew the shooter, identified as Nikolas Cruz, described a volatile teenager whose strange behavior had caused others to end friendships with him, particularly after the fight that led to his expulsion.
Suspect Nikolaus Cruz, 19, is in custody. #stonemandouglasshooting— Broward Sheriff (@browardsheriff) February 14, 2018
Frantic parents rushed to the school to find SWAT team members and ambulances surrounding the huge campus. Live television footage showed emergency workers who appeared to be treating the wounded on sidewalks.
‘‘It is a horrific situation,’’ said Robert Runcie, superintendent of the school district in Parkland, about an hour’s drive north of Miami. ‘‘It is a horrible day for us.’’
The suspect was taken into custody without a fight in a residential neighborhood about a mile away. He had multiple magazines of ammunition, authorities said.
‘‘It’s catastrophic. There really are no words,’’ Broward County Sheriff Scott Israel told reporters.
The attacker used the fire alarm ‘‘so the kids would come pouring out of the classrooms into the hall,’’ Sen. Bill Nelson told CNN.
‘‘And there the carnage began,’’ said Nelson, who said he was briefed by the FBI.
The Florida Democrat said he did not know if the gunman used the smoke grenades, but he assumed that’s why he had a gas mask on.
Most of the fatalities were inside the building, though some victims were found outside. The dead included a football coach, the sheriff said.
More than a dozen other people were wounded and taken to hospitals, doctors said.
Victoria Olvera, a junior at the school, said Cruz was expelled last school year because he got into a fight with his ex-girlfriend’s new boyfriend. She said he had been abusive to his girlfriend.
‘‘I think everyone had in their minds if anybody was going to do it, it was going to be him,’’ she said.
Dakota Mutchler, another junior, said he used to be friends with Cruz. But he cut off the friendship as Cruz’s behavior ‘‘started progressively getting a little more weird.’’ Cruz posted on Instagram about killing animals and threatened one of Mutchler’s friends, he said.
He remembered that Cruz had a pellet gun and did target practice in his backyard.
Student Daniel Huerfano said he recognized Cruz from an Instagram photo in which Cruz had posed with a gun in front of his face.
Cruz ‘‘was that weird kid that you see ... like a loner,’’ he said.
Freshman Max Charles was in class when he heard five gunshots.
‘‘We were in the corner, away from the windows,’’ he said. ‘‘The teacher locked the door and turned off the light. I thought maybe I could die or something.’’
As he was leaving the building, he saw four dead students and one dead teacher. He said he was relieved when he finally found his mother.
‘‘I was happy that I was alive,’’ Max said. ‘‘She was crying when she saw me.’’
About an hour after the attack, Michael Nembhard was sitting in his garage on a cul-de-sac when he saw a young man in a burgundy shirt walking down the street. In an instant, a police cruiser pulled up, and officers jumped out with guns drawn.
‘‘All I heard was ‘Get on the ground! Get on the ground!’’’ Nembhard said. He said the man did as he was told.
The day started normally at the school, which had a morning fire drill. Students were in class around 2:30 p.m. when another alarm sounded.
Junior Noah Parness said he and the other students calmly went outside to their fire-drill areas when he suddenly heard popping sounds.
‘‘We saw a bunch of teachers running down the stairway, and then everybody shifted and broke into a sprint,’’ Parness said. ‘‘I hopped a fence.’’
Beth Feingold said her daughter, Brittani, sent a text that said, ‘‘We’re on code red. I’m fine,’’ but sent another text shortly afterward saying, ‘‘Mom, I’m so scared.’’ She was later able to escape.
Students heard loud bangs as the shooter fired. Many of them hid under desks or in closets and barricaded doors.
Television footage showed students leaving in a single-file line with their hands over their heads as officers urged them to evacuate quickly.
The scene was reminiscent of the Newtown attack, which shocked even a country numbed by the regularity of school shootings. The Dec. 14, 2012, assault at Sandy Hook Elementary School killed 26 people — 20 first-graders and six staff members.
The 20-year-old Connecticut gunman, who also fatally shot his mother in her bed, then killed himself.
When Caesar Figueroa got to the Florida school to check on his 16-year-old daughter, he saw helicopters and police officers wielding guns.
‘‘It was crazy and my daughter wasn’t answering her phone.’’ She finally texted him that she was inside a closet with friends.
Len Murray’s 17-year-old son, a junior at the school, sent his parents a chilling text: ‘‘Mom and Dad, there have been shots fired on campus at school. There are police sirens outside. I’m in the auditorium and the doors are locked.’’
A few minutes later, he texted again, ‘‘I’m fine.’’
Murray said he raced to the school only to be stopped by authorities under a highway overpass within view of the school buildings. He said he told his son to save his battery and stop texting. The boy’s mother told him to turn off his ringer.
Murray said he’s had just one thought running through his mind since his son’s text: ‘‘All I keep thinking about is when I dropped him off this morning. I usually say, ‘I love you,’ and I didn’t this morning. He’s 17, he’s at that age. And I didn’t say it this morning, and I’m just kicking myself right now over and over and over.’’
The school was to be closed for the rest of the week.