Authorities say a gunman opened fire at a Florida high school Wednesday, killing “numerous” people, sending students running out into the streets and SWAT team members swarming in before authorities took him into custody about a mile away.

Frantic parents rushed to the scene and ambulances converged in front of the Marjory Stoneman Douglas High School. Live footage showed emergency workers appearing to treat possibly wounded people on the sidewalks.

The Broward County Sheriff’s Office tweeted Wednesday afternoon that “so far we have at least 14 victims.” The tweet added: “Victims have been and continue to be transported to Broward Health Medical Center and Broward Health North hospital.”

Broward County Schools Superintendent Robert Runcie said there were “numerous fatalities.”

“It is a horrific situation.” He added, “It is a horrible day for us.”

Nikolas Cruz, 19, has been taken into custody, said a U.S. official briefed on the investigation. The official spoke on condition of anonymity because he was not authorized to discuss the information publicly. Previously, Broward County Sheriff Scott Israel had said the suspect had been identified former student.

He said the shooter was outside and inside the school at points during the attack, and taken into custody “without incident” about an hour after he left the school. Israel said police were waiting for the SWAT team to give them the all-clear so that they could go inside the school.

Michael Nembhard said he was sitting in his garage about a mile away from the school watching the coverage on TV when he heard a police officer yelling, “Get on the ground, get on the ground, get on the ground!” He looked up and about 150 yards (140 metres) away he saw a teenage boy on the ground and an officer pointing a gun at him. The officer stood over the boy until other officers arrived, and the boy was handcuffed behind his back and taken away, Nembhard said.

At the school, Noah Parness, a 17-year-old junior, said the fire alarm went off for the second time of the day about 2:30 p.m. He said he and the other students calmly went outside to their fire drill areas when he suddenly heard several pops.

“Everyone was kind of just standing there calm, and then 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.”

The high school is a sprawling complex set on a tract in the South Florida community of Parkland, about 45 miles (70 kilometres) 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 neighbourhood of single-family homes.

Television footage showed police in olive fatigues, with weapons drawn, entering the school, then dozens of children frantically running and walking quickly out. A police officer waved the students on, urging them to quickly evacuate. Some students exited the building in single-file rows with hands raised overhead to show they carried no weapons. Others held onto other students as they made their way out past helmeted police in camouflage with weapons drawn.

The Broward Schools department said on its website that students and staff heard what sounded like gunfire and the school immediately went on lockdown.

Beth Feingold said her daughter, Brittani, sent a text at 2:32 p.m. that said, “We’re on code red. I’m fine,” but sent another text shortly afterward saying, “Mom, I’m so scared.”

Brittani later was able to escape the school, but was running along a busy road for part of the time, in what was a very chaotic scene around school — one of the state’s largest in the county with about 3,000 students.

Feingold said her daughter struggled with anxiety so she knew that she needed to stay calm. She told her daughter in a phone conversation when she was still inside a school building that a SWAT team was there to protect her. She said she told her: “Your dad is on one side of the building, and I’m on the other.”

Feingold said there had been a fire drill in the morning. Then in fourth period, someone pulled the fire alarm again and shouted code red.

Caesar Figueroa said when he got to the school to check on his 16-year-old daughter, he saw police officers drawing machine-guns as they approached the campus.

“My wife called me that there was an active shooter and the school was on lockdown. I got on the road and saw helicopters. … 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 around 2:30pm: “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.

No information has been provided yet to parents, he said. “I’m scared for the other parents here. You can see the concern in everybody’s faces. Everybody is asking, ‘Have you heard from your child yet?’” Murray said.

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 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. Say it early and often, I’m telling you.”