Just before the deadly shooting broke out, some students at Marjory Stoneman Douglas High School in Florida 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 on Wednesday afternoon shortly before they were to be dismissed, they once again filed out into the hallways.
That's when police say 19-year-old Nikolas Cruz, equipped with smoke grenades and multiple magazines of ammunition, opened fire with a semi-automatic AR-15 weapon, killing 17 people and sending hundreds of students fleeing into the streets.
It was the nation's deadliest school shooting since 26 people died when a gunman attacked an elementary school in Newtown, Connecticut, more than five years ago.
"Our district is in a tremendous state of grief and sorrow," said Robert 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 he had been kicked out of the high school.
Students who knew him described a volatile teenager whose strange behaviour had caused others to end friendships with him.
Cruz's mother Lynda Cruz died of pneumonia on November 1 friends and family members told the Sun Sentinel. Cruz and her husband, who died of a heart attack several years ago, adopted Nikolas and his 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, said.
Unhappy there, Nikolas Cruz asked to move in with a friend's family in Broward. The family agreed. According to the family's lawyer they knew that Cruz owned the AR-15 but made him keep it locked in a cabinet.
Victoria Olvera, a 17-year-old junior at the school, said Cruz was expelled last 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 neighbourhood about 2km away.
Frantic parents rushed to the school to find SWAT team members and ambulances surrounding the campus.
Many of the students hid under desks or in closets, and barricaded doors.
"We were in the corner, away from the windows," said freshman Max Charles. "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 crying mother.
"I was happy that I was alive," Max said.
Senator 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.
Australian Associated Press