A teacher who survived the 2022 Robb Elementary school shooting in Uvalde, Texas, testified Monday that he saw the gunman as a “black shadow” holding a gun and that he prayed for the attack to end after he was shot along with his students.

Arnulfo Reyes’ testimony came on the fifth day of the trial for Adrian Gonzales, a former Uvalde schools police officer. Gonzales has pleaded not guilty to 29 counts of child abandonment or endangerment, with prosecutors alleging he did nothing to stop the gunman in the first moments of the attack.

Reyes testified that the attack began with the gunman walking inside. He told the jury, “I looked at my door and that’s when I saw him … a black shadow. The black shadow was holding a gun. I just saw the fire come out of the gun.” He then said, “He shot at me and hit me in my arm. That’s when I fell to the ground.”

Reyes said that when he fell, the gunman “came around and he shot the kids.” He testified that Ramos turned back and shot him in the back. Reyes said that after being hit, he prayed “and I gave myself to the Lord … and waited for everything to be over.”

Reyes also described what he heard as the gunman moved through nearby areas. He testified that Ramos walked into the adjoining classroom, where he heard a student say, “Officer, we’re in here,” before he heard more shooting. He said Ramos taunted him while Reyes tried to pretend he was dead.

Reyes was a teacher in Room 111, and none of the children in his classroom survived. Just before he testified, the court watched surveillance video of Ramos entering the school and beginning to shoot, and the judge had warned the courtroom that the images and sounds would be graphic.

Gonzales, who is on trial in Corpus Christi, Texas, is accused by prosecutors of failing to act while the gunman was still outside the school and later during an effort to go inside. Prosecutors alleged that Gonzales abandoned his active shooter training and did not try to engage or distract the gunman while he was still outside, and that he failed again minutes later when a group of officers went into the school and retreated under heavy gunfire.

Prosecutors also focused on the classroom outcomes as evidence. At one point, they showed the school portraits of each of the children to Reyes and asked him to read their names and say whether they died or survived. Reyes was not asked about Gonzales during prosecutors’ questioning, and he mentioned only encountering a Border Patrol officer when the shooting stopped.

At the start of cross-examination, defense attorneys pointed to doors they said were unlocked in violation of school policy, including the outside doors and the door to Reyes’ classroom. Reyes testified that he believed his classroom door was locked. His testimony was expected to continue Tuesday.

Prosecutors’ case is built around the initial response and the time it took before a tactical team entered, with Gonzales among more than 370 federal, state and local officers to arrive at the school. The trial is tightly focused on what prosecutors say Gonzales did—or did not do—during those early minutes, and on whether his actions could be linked to the loss of lives inside Room 111.