WINDER, Ga.>> A 14-year-old student opened fire at a Georgia high school and killed four people on Wednesday, authorities said, sending students scrambling for shelter in their classrooms — and eventually to the football stadium — as officers swarmed the campus and parents raced to find out if their children were safe.

The dead were identified as two students and two teachers at Apalachee High School in Winder, about an hour’s drive from Atlanta. Killed were two other 14-year-olds, Mason Schermerhorn and Christian Angulo, and instructors Richard Aspenwall and Christina Irimie, Georgia Bureau of Investigation Director Chris Hosey said in a nighttime news conference.

At least nine other people — eight students and one teacher — were taken to hospitals with injuries. All were expected to survive, Barrow County Sheriff Jud Smith said.

The words “hard lockdown” appeared on a screen in junior Layla Ferrell’s health class and lights began flashing. She and her frightened classmates piled desks and chairs in front of the door to create a barricade, she recalled.

Sophomore Kaylee Abner was in geometry class when she heard the gunshots. She and her classmates ducked behind their teacher’s desk, and then the teacher began flipping the desk in an attempt to barricade the classroom door, Abner said. A classmate beside her was praying, and she held his hand while they all waited for police.

After students poured into the football stadium, Abner saw teachers who had taken off their shirts to help treat gunshot wounds.

Two school resource officers encountered the shooter within minutes after a report of shots fired went out, Georgia Bureau of Investigation Director Chris Hosey said. The suspect, a student at the school, immediately surrendered and was taken into custody. He is being charged as an adult with murder.

Authorities were still looking into how the suspect obtained the gun used in the shooting and got it into the school in Barrow County, a rapidly suburbanizing area on the edge of metro Atlanta’s ever-expanding sprawl. At an afternoon news conference, officials would not say what type of gun was used.

Smith choked up as he began to speak during the briefing. He said he was born and raised in the community and his kids are in the school system.

“My heart hurts for these kids. My heart hurts for our community,” he said. “But I want to make it very clear that hate will not prevail in this county. I want that to be very clear and known. Love will prevail over what happened today.”

It was the latest among dozens of school shootings across the U.S. in recent years, including especially deadly ones in Newtown, Conn., Parkland, Fla., and Uvalde, Texas. The classroom killings have set off fervent debates about gun control and frayed the nerves of parents whose children are growing up accustomed to active shooter drills in classrooms. But they have done little to move the needle on national gun laws.

Landon Culver, an 11th grader, said he had stepped out of his algebra class to get a drink of water when he heard shots and then saw someone wearing a black hoodie with a long gun. “I didn’t really stick around too long to look,” he said.

Instead he ran back inside the classroom and locked the door. The class huddled in the back in the dark and waited for the rampage to end. Culver listened as gunshots rang out in the building. “You’re just wondering like, which one of those is going to be somebody that you’re best friends with or somebody that you love?” he said.

Later police officers arrived and escorted the students out. As he was leaving, Culver saw “multiple people who had been shot.”

“You hear about this kind of stuff, but you like never think it’s going to happen to you until like it’s happening.”

When Erin Clark, 42, received a text from her son Ethan, a senior, saying there was an active shooter, she rushed from her job at the Amazon warehouse to the school.

Clark said her son was writing an essay in class when he first heard gunfire. He worked with his classmates to barricade the door and hide. “It makes me scared to send him back,” Clark said. “I don’t know what I’m going to do.”

Barrow County schools will be closed for the rest of the week as they cooperate with the investigation, but grief counseling will be available.

“It’s just outrageous that every day, in our country, in the United States of America, that parents have to send their children to school worried about whether or not their child will come home alive,” Vice President Kamala Harris said during a campaign stop in New Hampshire.

In a message posted to social media, former President Donald Trump said: “These cherished children were taken from us far too soon by a sick and deranged monster.”

The FBI’s Atlanta office said its agents were at the school “coordinating with and supporting local law enforcement.”

Apalachee High School has about 1,900 students, according to education records. It opened in 2000, and is named after the Apalachee River.

On Wednesday evening, hundreds gathered in Jug Tavern Park in downtown Winder for an ecumenical prayer vigil.