Parkland (Reuters): A 19-year-old gunman returning to a Florida high school where he had once been expelled opened fire with an assault rifle on Wednesday, killing 17 people and wounding more than a dozen others before he was arrested , authorities said.

The shooting at Marjory Stoneman Douglas High School in Parkland, a placid, middle-class community about 45 miles (72 km) north of Miami, ranked as the second-deadliest act of gun violence ever on a US public school campus.

The attack began shortly before the school’s dismissal.

Television footage showed images, increasingly familiar in America, of bewildered students streaming out of the building with hands raised in the air, weaving their way between heavily armed, helmeted police officers, as a fire truck and other emergency vehicles idled nearby.

Florida’s two US senators, briefed by federal law enforcement officials, said the assailant wore a gas mask as he stalked into the school carrying a rifle, ammunition cartridges and smoke grenades, then pulled a fire alarm, prompting students and staff to pour from their classrooms into hallways.

“There the carnage began,” Senator Bill Nelson told CNN. Senator Marco Rubio gave a similar account on Twitter.

A chilling cell phone video clip broadcast by CBS News showed a brief scene of what the network said was the shooting in progress from inside a classroom, where several students were seen huddled or lying on the floor surrounded by mostly empty desks. A rapid series of loud gunshots are heard amid hysterical screaming and someone yelling, “Oh my God.”

The gunman was arrested later outside, some distance from the school in an adjacent community. CNN, citing law enforcement sources, said the gunman tried to blend in with students who were fleeing the school but was spotted and taken into custody.

He was identified as Nikolas Cruz, who previously attended the high school and was expelled for unspecified disciplinary reasons, Broward County Sheriff Scott Israel said at a news briefing hours later.

As a high school freshman, Cruz was part of the US military-sponsored Junior Reserve Officers’ Training Corp program at the school , according to Jillian Davis, 19, a recent graduate and former fellow JROTC member at Stoneman Douglas High.

In an interview with Reuters, Davis recalled his “strange talking sometimes about knives and guns,” adding, “no one ever took him seriously.”

Chad Williams, 18, a senior at Stoneman Douglas, described Cruz as “kind of an outcast” who was known for unruly behavior at school , including a penchant for pulling false fire alarms, and was “crazy about guns.”

The gunman surrendered to police without a struggle, Israel said. He was armed with an AR-15-style rifle and had multiple magazines of ammunition.