Frantic parents rushed to the scene and ambulances converged in front of the Marjory Stoneman Douglas High School, and live footage showed emergency workers appearing to treat possibly wounded people on the sidewalks.
Law enforcement officials identified the suspect as Nikolas Cruz, who Superintendent Robert Runcie said was a former student who opened fire around dismissal. There was no evidence of a second suspect, authorities said, and no threats or warnings prior to the incident.
"It's a day that you pray every day we will never have to see," Runcie said.
Seventeen-year-old junior Matthew Walker spoke to ABC News, saying the suspect was known to show off knives and guns.
"He was going class to class just shooting at random kids," he said. "Everything he posts (on social media) is about weapons. It's sick."
Television footage showed police in olive fatigues, with weapons drawn, entering the school, then dozens of children running and walking quickly out. A police officer waved the students on, urging them to quickly evacuate the school.
The shooter was initially said to be at large before authorities announced that the suspect was in custody about an hour after the incident.
Coral Springs police said on their Twitter account Wednesday that the school was locked down and that students and teachers inside should remain barricaded until police reach them.
Len Murray's 17-year-old son, a junior at the school, sent his parents a chilling text around 2:30 p.m.: "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, while the boy's mother told him to turn off his ringer.
"I'm scared for the other parents here," he said. "You can see the concern in everybody's faces. Everybody is asking, 'Have you heard from your child yet?'"
Murray said he's had just one thought running through his mind since he got 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 think 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. Say it early and often, I'm telling you."
My prayers and condolences to the families of the victims of the terrible Florida shooting. No child, teacher or anyone else should ever feel unsafe in an American school.— Donald J. Trump (@realDonaldTrump) February 14, 2018
The school district issued the following statement:
Regarding Marjory Stoneman Douglas High School
Close to dismissal today at Marjory Stoneman Douglas High School, staff and students heard what sounded like gunfire. The school went on an immediate code red lock down. We are receiving reports of possible multiple injuries. The school remains on lock down. Law enforcement and the District's Special Investigative Unit are currently on site. The District will provide updates as more information becomes available.
The high school is a sprawling complex set on a tract in the South Florida community of Parkland, about 45 miles (70 kilometers) north of downtown Miami.
The school had just over 3,100 students in the 2016-2017 academic year, according to the National Center for Education Statistics. Major streets run along two sides and an expressway passes nearby on the other not far from a residential neighborhood of single family homes.
(The Associated Press contributed to this report)
* More local news
* Send us a news tip
* Download the abc7NY app for breaking news alerts