As the shooting broke out, some students at Marjory Stoneman Douglas High School thought they were having another fire drill.
Such an exercise had forced them to leave their classrooms hours earlier. So when the alarm went off Wednesday afternoon shortly before they were to be dismissed, they once again filed out into the hallways.
19-year-old Nikolas Cruz, equipped with a gas mask, smoke grenades and multiple magazines of ammunition, opened fire with a semi-automatic weapon, killing 17 people and sending hundreds of students fleeing into the streets. It was the nation's deadliest school shooting since a gunman attacked an elementary school in Newtown, Connecticut, more than five years ago.
Broward County Schools superintendent Robert Runcie told reporters on Thursday that Cruz did not set off the school's fire alarms as originally thought - instead, it was the powder and smoke from the guns that set them off.
"Our district is in a tremendous state of grief and sorrow," said Runcie, superintendent of the school district in Parkland, about an hour's drive north of Miami. "It is a horrible day for us."
Authorities offered no immediate details about Cruz or his possible motive, except to say that he had been kicked out of the high school, which has about 3,000 students. Students who knew him described a volatile teenager whose strange behavior had caused others to end friendships with him.
Cruz's mother Lynda Cruz died of pneumonia on Nov. 1 neighbors, friends and family members said, according to the South Florida Sun Sentinel. Cruz and her husband, who died of a heart attack several years ago, adopted Nikolas and his biological brother, Zachary, after the couple moved from Long Island in New York to Broward County.
The boys were left in the care of a family friend after their mother died, family member Barbara Kumbatovich, of Long Island, said.
Unhappy there, Nikolas Cruz asked to move in with a friend's family in northwest Broward. The family agreed and Cruz moved in around Thanksgiving. According to the family's lawyer, who did not identify them, they knew that Cruz owned the AR-15 but made him keep it locked up in a cabinet. He did have the key, however.
Jim Lewis said the family is devastated and didn't see this coming. They are cooperating with authorities, he said.
Victoria Olvera, a 17-year-old 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.
Cruz was taken into custody without a fight about an hour after the shooting in a residential neighborhood about a mile away. He had multiple magazines of ammunition, authorities said.
"It's catastrophic. There really are no words," said Broward County Sheriff Scott Israel.
Frantic parents rushed to the school to find SWAT team members and ambulances surrounding the huge campus and emergency workers who appeared to be treating the wounded on sidewalks. Students who hadn't run began leaving in a single-file line with their hands over their heads as officers urged them to evacuate quickly.
Hearing loud bangs as the shooter fired, many of the students inside hid under desks or in closets, and barricaded doors.
"We were in the corner, away from the windows," said freshman Max Charles, who said he heard five gunshots. "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."
Noah Parness, a 17-year-old junior, 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."
Most of the fatalities were inside the building, though some victims were found fatally shot outside, the sheriff said.
Sen. Bill Nelson told CNN that Cruz had pulled the fire alarm "so the kids would come pouring out of the classrooms into the hall."
"And there the carnage began," said Nelson, who said he was briefed by the FBI.
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 gunman, who also fatally shot his mother in her bed, then killed himself.
Not long after Wednesday's attack in Florida, 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 Cruz did as he was told.
The school was to be closed for the rest of the week.