SANTA FE — The teenage gunman arrested after a massacre that killed 10 people and wounded 13 at his school outside Houston confessed following a 15-minute firefight with authorities, court documents say.

His statement left why he laid waste to Santa Fe High School a mystery, but a mother of one victim said her daughter had rejected his advances a week before the attack.

Dimitrios Pagourtzis is being held without bail. (Galveston County Jail)

Dimitrios Pagourtzis, a junior at the school, was taken into custody after he collapsed in front of an art lab, according to a probable-cause affidavit filed in court.

The teenager waived his Miranda rights and "admitted to shooting multiple people inside the school," the document said.

More details emerged Saturday about what had happened before that in the bloody classrooms and halls of the school.

The attack began with a shotgun blast through the door of the art classroom, witnesses said Saturday. That sent panicked students to the entryway to keep the shooter outside.

Clad in a trench coat and carrying a revolver and sawed-off shotgun, the gunman fired again through the wooden door, killing his first victim, Christopher Stone, who was shot in the chest.

He then lingered for nearly 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 Stone, his friend, killed at the door and was grazed in the stomach by another volley of fire. He and others survived by playing dead.

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

“It hasn't even completed functioned through my head that I have gotten shot and that I was in a school shooting.” Breanna Quintanilla, hit by ricochet, while fleeing Santa Fe H.S. She is out of the hospital. Hear from her at 10 @FOX4 pic.twitter.com/mjgeXe8bxr — Blake Hanson (@BlakeFox4News) May 19, 2018

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

The attacker 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 the shooter 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."

Those who didn't make it were named Saturday by the Galveston County medical examiner's office and sheriff's office: two teachers, Glenda Perkins and Cynthia Tisdale, and eight students, Kimberly Vaughan, Shana Fisher, Angelique Ramirez, Christian Riley Garcia, Jared Black, Sabika Sheikh, Christopher Jake Stone and Aaron Kyle McLeod.

Fisher's mother, Sadie Rodriguez, said her daughter had recently spurned the romantic advances of the 17-year-old, a possible motive for the state's deadliest school shooting since Charles Whitman, the University of Texas Tower sniper, killed a total of 17 people in 1966.

"He continued to get more aggressive," Rodriguez said in an interview conducted Saturday via Facebook. "She finally stood up to him and embarrassed him."

Also on Saturday, the head of Santa Fe schools asked Americans for their prayers as her staff and students recovered.

"Words cannot express the sorrow in our hearts today as we continue to mourn those we lost and those who need our support," said Superintendent Leigh Wall. "This is a time for prayer and a time to rely on the deep bonds that have always held our community together."

The parking lot at Santa Fe High School around 11:40 am and 3:44 pm today. Little by little, in groups of 10, students have been allowed back into school to collect their valuables and retrieve their cars. Authorities say they’re trying to move into “new normal” pic.twitter.com/CPBhi8eFue — James Barragán (@James_Barragan) May 19, 2018

The suspect's family released its own statement Saturday, saying they were "mostly in the dark" about the motives behind the attack, which they said was "incompatible with the boy we love."

"We are as shocked and confused as anyone else by these events," the statement said. "We share the public's hunger for answers."

A victim of bullying, according to some students, Pagourtzis told authorities that he had spared students he liked so his story could be told. He had intended to commit suicide but didn't go through with it, officials said.

"He decided to chicken out of that and came out with his hands up," County Judge Mark Henry said Saturday, adding that police exchanged "a lot of firepower" with Pagourtzis before he surrendered. "The investigator said there were a lot of shell casings from both sides."

Pagourtzis "sort of fell to the ground and surrendered," said U.S. Rep. Michael McCaul, a former federal prosecutor and a Republican from Austin.

McCaul, chairman of the House Homeland Security Committee, added that authorities had recovered a couple of explosive devices at the school and "several" in Pagourtzis' vehicle and home, and that the devices had been sent for testing to the FBI laboratory in Quantico, Va.

However, Henry said Saturday that the devices were duds, incapable of detonating.

Authorities 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.

Galveston County Judge Mark Henry calls @SantaFeISD Police Officer a hero after he ran toward the gunshots. He is in critical but stable condition. @WestwoodOne pic.twitter.com/SFfTyASOlJ — Clayton Neville (@ClaytonNeville) May 19, 2018

Henry praised Officer John Barnes, the school resource officer, who was critically wounded when he ran toward danger.

"He's a hero in my book," the county official said.

Santa Fe ISD Police Chief Walter Braun said the school resource officer was in critical but stable condition Saturday.

"Our officers went in there and did what they could," the chief said. "Did what they trained for."

U.S. Rep. Randy Weber, who represents the area, also praised the officer's response, saying it was "critical" in stopping the attack.

"The main thing that stops a bad person with a gun is a good person with a gun," the Republican from Pearland said.

Democrats, however, took the opportunity to call for stricter gun control laws.

Gubernatorial candidate Andrew White, one of two Democrats vying for the post, urged Republican Gov. Greg Abbott to "open his mind to protect our kids" by calling a special legislative session to change gun laws and spend money to harden Texas schools.

Abbott spokesman John Wittman declined to comment.

A hospital treating three of the 13 wounded said one patient, a minor, was in good condition and the other two were critical.

Hospitals on Friday reported treating a total of 14 people for injuries related to the shooting, but the FBI's Houston office put the number at 13, revised from 10 on Friday.

It was the second tragedy to afflict Santa Fe in recent months, after Hurricane Harvey last year. But Weber was confident the community would recover.

"We will pull together. We will grieve together. We will love one another. We will once again laugh," he said. "It will be a while, but we will get through this."

The investigation at the crime scene continued Saturday as FBI investigators and forensics teams scoured the hallways for evidence. The school parking still held vehicles, many belonging to students who had had to leave them overnight.

Cars have been trickling out of the parking lot slowly. Yellow school buses have been bringing students and adults to pick their cars up. #SantaFe pic.twitter.com/ZqoLECd76R — Jackie Wang (@jcqlnwng) May 19, 2018

Junior Tori White came a little too early to pick up her car. She spoke softly, her arm crossed over her chest, holding her elbow.

White described how teachers had told students to run across the street that morning, pointing at the front doors of the school and drawing their escape path with her hand. Students in the back of the school ran to the fields, she said.

White said her one or two conversations with the shooter in the past had never been more than superficial. "He kept to himself," she said.

1 / 11A Texas state trooper talks to drivers along State Highway 6 outside of Santa Fe High School.(Andy Jacobsohn / Staff Photographer) 2 / 11A Texas State Trooper stands outside of Santa Fe High School in Santa Fe, Texas Saturday May 19, 2018.(Andy Jacobsohn / Staff Photographer) 3 / 11Children carry candles following a vigil along Avenue M and Highway 6 following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 4 / 11Texas governor Greg Abbott hugs Santa Fe High School student Rylie Bouvier, 15, during a vigil following a shooting at Santa Fe High School in Texas on May 18.(Andy Jacobsohn / Staff Photographer) 5 / 11A mourner reacts during a vigil following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 6 / 11William Hunter (right) stands near his daughter Destiny Hunter (center), who is home schooled, during a vigil following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 7 / 11Mourners embrace during a vigil along following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 8 / 11William Hunter embraces his daughter Destiny Hunter, who is home schooled, during a vigil following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 9 / 11Mourners embrace during a vigil following a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 10 / 11People gather outside a location where parents were instructed to go to reunite with their children and gain information after a shooting at Santa Fe High School on May 18.(Andy Jacobsohn / Staff Photographer) 11 / 11Authorities gather outside of Santa Fe High School in Santa Fe on May 19.(Andy Jacobsohn / Staff Photographer)

On Saturday, Pagourtzis remained in the Galveston County Jail, charged with capital murder and aggravated assault against a public servant. He was being held without bail.

His lawyer said he was cooperating fully with authorities.

"Obviously this is a tough situation," Nicholas Poehl told the Houston Chronicle. "He's in difficult circumstances. He's behaving consistently with that."

Pagourtzis' family, the attorney said, is still trying to process what the boy is accused of doing.

"The family is stunned," Poehl said. "You can't fake that."

Henry Van de Putte of the regional American Red Cross is urging survivors of yesterday’s Santa Fe High School shooting to take advantage of assistance services being offered at Aldersgate United Methodist Church. Also asks reporters to stay away, go back to high school press area pic.twitter.com/BxeyXRS8Zi — James Barragán (@James_Barragan) May 19, 2018

Santa Fe school district officials said classes would be canceled Monday and Tuesday. What happens after that is tough for many students to wrap their heads around.

"It's going to be hard going back to school," White said. "I want to go back to school, but not seeing these people in the hallways is going to be very hard."

Her father, standing a few feet away to let her speak with reporters, wrapped a protective arm around her minutes later. It was time to go.

Breaking News reporter Claire Ballor and The Associated Press contributed to this report.