Class had recently begun when Daymon Rabon, a senior at Santa Fe High School in Texas, heard a loud bang in the room next door.
"We thought maybe someone was banging on the shop door or maybe something fell," he said.
Rabon's teacher went to investigate and the curious student followed.
They heard three more bangs and saw the shooter come out of an art room.
"At this point we knew this was ... really happening to us," Rabon said.
The shooter went back into the art room, he said.
Rabon and the teacher retreated into their classroom and started to barricade the door.
Panic mounted as the other students realized what was happening.
The teacher tried to calm them as he worked to block the entrance, Rabon said.
The bangs continued, and they got louder, Rabon said, adding he heard more than a dozen shots.
"You could hear him getting closer," he said. "Everyone was crying, in complete tears, just in utter disbelief."
Then, they heard shots from another gun or guns.
The students were in the classroom for another hour to 90 minutes until police came and got them out, the student said.
According to authorities, 10 people were killed and at least 10 injured in the school shooting, the third in eight days and the 22nd since the beginning of the year. A male suspect, a student, is in jail, accused of murder and aggravated assault on a public servant.
Witnesses gave their accounts to CNN affiliates in the immediate aftermath of the shooting -- when emotions were running high and law enforcement agencies had confirmed few details.
But the scene the shocked students and some of their parents described was all too familiar, coming three months after the massacre at Marjory Stoneman Douglas High School in Parkland, Florida.
Is that a fire drill?
Dakota Shrader and her classmates left the history hallway after the fire alarms went off and headed outside.
"'Cause nobody thought it would be this," she told CNN affiliate KPRC, her voice breaking as tears rolled down her face. "Nobody thought it was a shooting. Everybody just thought it was a, you know, normal procedure."
"And the next thing you know, we just hear ... three gunshots, loud explosions, and all the teachers are telling us to run, run, go, like run," Shrader said.
Shrader and a friend ran for the trees to take shelter, she told KPRC, while sirens rang out in the distance. She began having an asthma attack, but she was able to call her mom. "I just wanted to be safe," she told reporters later, wrapped in her mother's arms.
Like Shrader, other witnesses at the scene of Friday's shooting at Santa Fe High School described chaos as gunshots rang out and fire alarms blared, scattering students in all directions.
"I was scared for my life," Shrader said. "Nobody should be able to feel that in school. This is a place where we're supposed to feel safe."
"Nobody should have to go through this, and nobody should feel that pain. It hurts my heart to see this."
At first, it was like any other day
Angelica Martinez, 14, told CNN she was in first period doing her work. It seemed like a typical Friday morning. Then her classmates were evacuated "like it's a fire drill," she said.
"We all went outside like a normal procedure," she said. But while she and her classmates stood outside, kids began running out of the building.
"They said, 'Run, run. There's somebody with a gun,'" Martinez said.
She said she heard about four gunshots.
'I was terrified'
One student's mother, identified only as Shannon, was driving when she got a phone call from her daughter about the shooting.
"She said, 'Mom, there's shots.' And I said, 'What?'"
"She said, 'There's shots in the school,' and she was crying," the mother told KPRC, wiping a tear from her face.
She turned her car around and "hauled it all the way to school," she said, behind a police officer who was headed to the scene. "Thank God I was close."
Shannon, standing outside a gas station near the campus, said she stayed on the phone with her daughter, telling her to listen to her teacher, stay down and keep quiet.
"I was terrified," she said.
A classmate shot in the leg
One witness told CNN affiliate KTRK she was in art class when a gunman walked in and began firing what she believed was a shotgun.
She saw a girl get shot in the leg "and everyone started running, ... like, everyone started screaming and running."
She didn't get a good look at the shooter, the witness told KTRK.
'It felt like hours'
Not long after substitute teacher David Briscoe began his English class, chaos erupted.
"It was simultaneous," he told CNN. He heard gunshots and screaming, quickly followed by a fire alarm. But it was clear, Briscoe said, this was an active shooter situation.
Briscoe ordered his students to get down, he said, knowing he couldn't take them into the hall without knowing where the shooter might be.
"I barricaded the door with desks and tables and shut the lights."
Briscoe heard what sounded like a student getting hit by a bullet, he said, "and groaning."
"Honestly, it felt like hours before we got out of the school," he said, "but one of my students said it was 30 to 45 minutes."
'I didn't know what to think'
Another student told KPRC she heard the fire alarm but believed it was just a typical drill. She left her bag and her belongings inside and began to make her way out of the building.
When she first heard gunshots, she assumed a fire had broken out.
"Because the fire drill went off, I thought it was like the fire popping," she said. "And then I heard so many people saying that like it was gunshots and that people were dead, and I didn't know what to think," she said, her voice shaky and her face red.
A male student took her hand, she said, and they ran toward the bushes far from the school.