The suspect in the Texas school shooting began his attack by firing a shotgun through an art classroom door, shattering a glass pane and sending panicked students to the entryway to block him from getting inside, witnesses said.

Dmitrios Pagourtzis fired again through the wooden part of the door and fatally hit a student in the chest. He then lingered for about 30 minutes in a warren of four rooms, killing seven more students and two teachers before exchanging gunfire with police and surrendering, officials said.

Freshman Abel San Miguel saw his friend Chris Stone killed at the door. San Miguel was grazed on the left shoulder by another volley of shots. He and others survived by playing dead.

"We were on the ground, all piled up in random positions," he said.

Galveston County Judge Mark Henry, the county's chief administrator, said he did not think Friday's attack was 30 minutes of constant shooting, and that assessment was consistent with other officials who said law enforcement contained the shooter quickly. But authorities did not release a detailed timeline to explain precisely how events unfolded.

Junior Breanna Quintanilla was in art class when she heard the shots and someone say, "If you all move, I'm going to shoot you all."

The 17-year-old Pagourtzis walked in, pointed at one person and declared, "I'm going to kill you." Then he fired.

"He then said that if the rest of us moved, he was going to shoot us," Quintanilla said.

When Quintanilla tried to run out a back door, she realized Pagourtzis was aiming at her. He fired in her direction.

"He missed me," she said. "But it went ahead and ricocheted and hit me in my right leg." She was treated at a hospital and spoke with a brown bandage wrapped around her wound.

"It was a very scary thing," Quintanilla said. "I was worried that I wasn't going to be able to make it back to my family."

In their first statement since the massacre, Pagourtzis' family said Saturday that the bloodshed "seems incompatible with the boy we love."

"We are as shocked and confused as anyone else by these events," said the statement, which offered prayers and condolences to the victims.

Relatives said they remained "mostly in the dark about the specifics" of the attack and shared "the public's hunger for answers."

Pagourtzis' attorney, Nicholas Poehl, said he was investigating whether the suspect endured any "teacher-on-student" bullying after reading reports of his client being mistreated by football coaches.

In an online statement, the school district said it investigated the accusations and "confirmed that these reports were untrue."

Poehl said that there was no history of mental health issues with his client, though there may be "some indications of family history." He said it was too early to elaborate.

Zach Wofford, a senior, said he was in his agricultural shop class when he heard gunfire from the art classroom across the hall. He said substitute teacher Chris West went into the hall to investigate and pulled a fire alarm.

"He saved many people today," Wofford said of West.

The mother of one slain student said her daughter may have been targeted because she rejected advances from Pagourtzi, who was an ex-boyfriend of her daughter's best friend.

Sadie Rodriguez said her 16-year-old daughter, Shana Fisher, repeatedly told him no, and he "continued to get more aggressive." The week before the shooting, Fisher "stood up to him" by embarrassing him in class, Rodriguez said.

The Houston branch of the FBI tweeted Saturday that 13 people were wounded in the attack, up from 10 previously. Hospitals reported treating 14 people with shooting-related injuries, and the reason for the discrepancy still was not clear.

In addition to a shotgun and a handgun, Pagourtzis also had several kinds of homemade explosive devices, but they were not capable of detonating, Henry said.

Investigators found a cluster of carbon dioxide canisters taped together, and a pressure cooker with an alarm clock and nails inside. But the canisters had no detonation device, and the pressure cooker had no explosive material, Henry said.

"They were intended to look like IEDs, but they were totally non-functional," Henry said, referring to the improvised explosive devices common in the early years of the U.S.-led war in Iraq.

Authorities have offered no motive, but they said in a probable-cause affidavit that the suspect had admitted to carrying out the shooting.

The gunman told police that when he opened fire, he avoided shooting students he liked "so he could have his story told," the affidavit said.

From first word of the shooting, at 7:32 a.m. Friday, until confirmation that the suspect was in custody, the attack lasted about half an hour.

Dispatch records indicate that law enforcement first entered the building about seven minutes after learning of the assault. The suspect was said to be in custody by shortly after 8 a.m.

Texas Gov. Greg Abbott said the assailant got a handgun and shotgun from his father, who owned them legally. But it was not clear whether the father knew his son had taken them or if the father could face prosecution. State law makes it illegal to give a gun to anyone under 18, except under the supervision of an adult for hunting or sport shooting.

Pagourtzis, who appeared to have no prior arrests or confrontations with law enforcement, made an initial court appearance Friday on capital murder charges. A judge denied bond and took his application for a court-appointed attorney.

The shooting in Santa Fe, a city of 13,000 people about 30 miles (48 kilometers) southeast of Houston, was the nation's deadliest such attack since the Parkland, Florida, massacre that killed 17 and energized the teen-led gun-control movement. It was also the deadliest assault in Texas since a man with a semi-automatic rifle attacked a rural church late last year, killing more than two dozen people.

Meanwhile, students on Saturday were being let back inside Santa Fe High School to gather belongings they abandoned when the gunfire began.

The school's grief was on display at an evening baseball game where Santa Fe players had crosses painted on their faces and the initials of shooting victims written on tape around their wrists. The team also fashioned a tape cross over the dugout with 10 sets of initials and "missed but never forgotten."

___

This version of the story corrects the 3rd paragraph to say San Miguel was grazed on his left shoulder, not the stomach.

___

Associated Press Writer Will Weissert in Austin contributed to this report.

___

Follow AP's coverage of the Santa Fe High School shooting here: https://apnews.com/tag/Schoolshootings .