SANTA FE, Tex. — A 17-year-old student armed with a shotgun and a pistol went on a rampage Friday morning at his school here outside Houston, killing 10 people – mostly students – before surrendering to the officers who confronted him, officials said. Ten others were wounded, including a school resource officer who was in critical condition.

Santa Fe High School was the latest scene of carnage in what has become a national epidemic of mass shootings. For the second time in the past three months, the victims were children and their teachers. It happened during first period.

Isabelle Laymance, 15, was in art class, drawing geometric shapes, when she heard gunshots. She froze for a moment, then she ran to a back door leading to a patio, but it was locked. She and seven other students barricaded themselves in a supply closet that connected two art classrooms. She lay on the floor and called police, then called her mother, whispering “I love you” while holding a friend’s hand. They shushed each other, hoping to avoid detection.

The trenchcoat-clad gunman – whom police identified as student Dimitrios Pagourtzis – came into the first art classroom and began shooting. He knew that students were hiding in the supply closet, Laymance said.

“He said ‘Surprise,’ and then he started shooting, and he killed one or two people. And he shot a girl in the leg. In the closet. He shot through the window,” she said. “We blocked the doors with ceramic makers, and he kept on trying to get in, and he kept on shooting inside the closet.”

Laymance called police three times over the course of 30 terrifying minutes. A dispatcher told her to be quiet and assured her that help was on the way, she said.

The gunman kept shooting, swearing and yelling. He shot a police officer who approached, then engaged other officers in discussion, offering to surrender.

“He kept saying, ‘If I come out, don’t shoot me.’ They didn’t shoot him, they just put him in handcuffs,” she said.

Pagourtzis, whom students described as a quiet loner, was held Friday without bond at the Galveston County jail, charged with capital murder and aggravated assault on a peace officer. It was unclear what motivated the attack, as authorities said it came without any obvious warning.

Pagourtzis made his first court appearance Friday evening, a little more than 10 hours after the massacre. He spoke quietly, saying “Yes, sir” when asked if he wanted a court-appointed attorney. After the brief hearing, he was led away.

Police said Pagourtzis gave a statement admitting responsibility for the shooting, according to a probable cause affidavit filed in court. Pagourtzis told police that he went into the school wearing a trench coat and wielding two guns intent on killing people.

The affidavit, which identifies him as Dimitrios Pagourtzis Jr., states that the 17-year-old told police that “he did not shoot students he did like so he could have his story told.”

The two guns used in the shooting belong to Pagourtzis’ father, according to Gov. Greg Abbott, R, who said it was unclear if the father knew that his son had taken them. Unlike many other mass shootings carried out with high-powered rifles like the AR-15, this one, authorities said, involved relatively common weapons.

Police said they also found explosive devices inside the school and at locations off campus.

Authorities said they were scrutinizing two other potential suspects in the shooting. Sheriff Ed Gonzalez of neighboring Harris County said officials questioned another student, described as “a person of interest.” Abbott said police also hoped to speak with a third person who he said could have “certain information,” though he did not elaborate.

Three officers responded to the attack, officials said. The first to confront the shooter was school safety officer John Barnes, a retired Houston police officer who, according to a former Houston colleague, Capt. Jim Dale, joined the Santa Fe Independent School District police force because he wanted a less stressful job.

Barnes was shot in both arms, Dale said. A second Santa Fe ISD officer arrived, pulled Barnes to safety and applied a tourniquet. A third officer, a state trooper, also engaged the gunman, according to a state police official.

Officials have not yet provided a timeline showing how long it took to respond to the active-shooter emergency calls, nor have they disclosed many details about their interactions with the shooter.

Barnes was taken by helicopter to the trauma center at the University of Texas Medical Branch in Galveston, where he was in danger of “bleeding out” when he arrived, chief medical officer Gulshan Sharma told reporters. Dale, the Houston police captain, said that many officers descended upon the hospital to show their support and that the family was in good spirits after hearing from doctors that Barnes’ injuries are probably not fatal.

Santa Fe High School, home of the Indians, had won a statewide award for its safety program. As an ominous precursor to Friday’s shooting, the school had experienced a false alarm about an active shooter in February, an event that attracted a massive emergency response and the chaotic arrival of fearful parents.

Many of the 1,400 students staged a walkout April 20 as part of a nationwide protest against school shootings, part of a grass-roots movement among young Americans in the wake of the February massacre of 17 students and staffers at Marjory Stoneman Douglas High School in Parkland, Florida. One sign carried by Santa Fe students during their April protest: “#NeverAgain.”

Four Fridays later, their school was attacked.

Gage Slaughter, 17, said he was sitting in his AP history class when the shooting started. When he heard the gunshots, he thought – as is so often the case in mass shootings – that it was just firecrackers. Someone pulled a fire alarm, he said, and everyone went outside. Then a coach and some teachers told the students to start running.

“There were people who were starting to cry,” he said. “I didn’t know what was going on until I was down the road a little ways and I heard one of the teachers saying it was a school shooter.”

In the hours that followed, heavily armed officers in tactical gear surrounded the school. Authorities said they found explosives in the building and in surrounding areas, and they put out warnings on social media for people to avoid touching anything unfamiliar.

Parents picked up their children early from other schools in the area as they reeled from the horror that had come to their community.

“I just need to cuddle (my) baby girl,” said Catharine Lindsey, a parent who lives nearby and said she could hear the rescue helicopters from her home. “Ever since Parkland, I’ve had to tell my 13-year-old daughter to not be a hero, to hide and stay safe with teacher if something like this happens, because she’s the type who would try and talk the shooter down.”

Dimitrios Pagourtzis, seen in an undated Facebook photo, told police that “he did not shoot students he did like so he could have his story told.” Facebook via Associated Press

This was the 16th school shooting so far this year, according to a Washington Post analysis. That’s the highest number at this point in any year since 1999, the year of the Columbine High massacre. The Post’s analysis found that since 1999, shootings during school hours have killed at least 139 children, educators and other people, with 277 more injured.

There was limited solid information about the victims at Santa Fe High in the hours after the shooting.

The Embassy of Pakistan confirmed Friday evening that Sabika Sheikh, a Pakistani exchange student, was killed in the attack.

“Our thoughts and prayers are with Sabika’s family and friends,” Ambassador Aizaz Ahmad Chaudhry said in a statement.

Another exchange student, Sayyed Zaman Haider, said Sabika was from Karachi and was studying through the Kennedy-Lugar Youth Exchange and Study Program, funded by the State Department’s Bureau of Educational and Cultural Affairs. A spokesman for the bureau did not immediately respond to a message seeking comment. Haider said Sheikh was about to return home: The academic year was ending, so she was almost done with her cultural exchange.

Cynthia Tisdale, 63, a substitute teacher at Santa Fe High School, died in the shooting, her family confirmed Friday. Tisdale worked at the school frequently, her son Recie Tisdale said.

“She started substitute teaching because she loved to help children,” he said. “She didn’t have to do it. She did it because she loved it.”

Recie Tisdale is a police detective in nearby League City. Cynthia Tisdale lived in Dickinson, Texas, with her husband of nearly 47 years, William Tisdale. The couple had three children and 11 grandchildren. William Tisdale said his wife had also been a paralegal for 22 years.

“She was a good woman,” he said. “She watched out for me.”

Among the injured was sophomore Rome Shubert, a pitcher on the school baseball team, who said that a bullet grazed his head. “I’m so grateful and blessed that God spared my life today,” Shubert wrote in a tweet. “Today I was shot in the back of the head but I am completely OK and stable.”

On Friday night, students gathered at a vigil here wearing T-shirts, made after Hurricane Harvey, that read “Texas Tough.” On the back: “Indians got your back.”

The shooting immediately drew condemnation nationwide. President Donald Trump quickly decried the Texas shooting.

“This has been going on too long in our country – too many years, too many decades now,” Trump said in Washington. “We grieve for the terrible loss of life and send our support and love to everyone affected by this absolutely horrific attack.”

In Santa Fe, Sen. Ted Cruz, R, said: “Once again Texas has seen the face of evil.”

In his jailhouse booking photo, the suspect, Pagourtzis, wore a blank expression, as if bored.

On a Facebook page, Pagourtzis had posted a photograph of a T-shirt saying “Born to Kill,” Abbott said during an afternoon news conference. But Abbott said the suspect did not have a criminal record or show signs of being violent. He said that in this case there weren’t the kind of red flags seen in other mass shootings, such as the one last year at a church in Sutherland Springs, Texas, or the one in Parkland, Florida.

The suspect documented his thoughts on his computer and cellphone, and the writings revealed not only that he intended to commit the shooting but also that he planned to commit suicide, the governor said. He said the shooter didn’t have the “courage” to follow through on the suicide.

Experts on mass shootings note that the killers study their predecessors, copy their moves and even their fashion choices. The shooter at Santa Fe High appeared to copy elements of the Columbine massacre: a black trench coat, a shotgun, explosives.

More than 30 shooters have copied the Columbine killers, and admitted they’d done so, according to Adam Lankford, a criminology professor at the University of Alabama.

“This seems like actually a more extreme version because of all of the different elements that seem to be copied, from clothing to weapons and modus operandi in terms of planting bombs,” Lankford said. “It’s a form of celebrity worship. The celebrities in this case are celebrity killers – the Columbine killers.”

Abbott said he will convene a roundtable of experts to discuss ways to stave off another school shooting, including speeding up background checks on gun buyers, putting more money into mental health treatment, and adding security personnel.

Lt. Gov. Dan Patrick said infrastructure is a problem: Schools have too many entrances and exits and need to be retrofitted.

“We may need to harden our schools and make them safer,” Patrick said.

Cable news and social media were dominated Friday by painfully familiar images of students being led out of the school by armed officers. Survivors of the Parkland massacre and their relatives, many of whom have become outspoken advocates for stronger gun control laws, publicly offered support to the Santa Fe community – and sent angry messages to politicians they said have not acted to avert such massacres.