A Texas police officer who engaged in a gunfight with a school shooter and urged colleagues to help wounded students even as he suffered massive blood loss is being hailed as a hero.
School district policeman John Barnes was seriously injured by a shotgun blast as he confronted the attacker.
He and another officer tackled the shooter within four minutes, saving many lives, a sheriff says.
Eight students and two teachers died last Friday at Santa Fe High School.
A 17-year-old student has confessed to the rampage, say authorities.
Galveston County Sheriff Henry Trochesset said at a Monday news conference the officers had rushed towards the sound of gunshots, just as they rehearsed during active shooter training.
"Every door they opened," he said, "they weren't sure what was on the other side of it, but they opened those doors continuously - time after time - until that school was cleared.
"That's what you call a hero. They didn't run from it, they ran to it."
Sheriff Trochesset said the officers isolated the suspect to one classroom as other officers arrived to help evacuate students from the school, which is south-east of Houston.
Within about half an hour the suspect, who was armed with a revolver and shotgun taken from his father, turned himself in to police.
The sheriff said his own granddaughter was hiding in a classroom "only three doors down" from the scene of the bloodbath.
Officers fired "minimal" shots at the gunman as they tried to persuade him to surrender, the sheriff said, adding it was too early to determine if any students had been hit by police gunfire.
The sheriff particularly praised Officer Barnes, who remains in intensive care at the University of Texas Medical Branch in Galveston.
His stepfather, Ronald Hatchett, told the New York Times Officer Barnes was shot in his right elbow.
As he lay bleeding, he urged the other officer to leave him and tend to the students, he said.
Retired HPD SPO John Barnes, 49, was sworn in in May 1995 & retired Jan 2018. He began his career at SW Patrol and began working in investigations in 2005. John is known for his tireless work in Houston Metro Internet Crimes Against Children (ICAC) task force. https://t.co/OBDOJ0SLkM— Chief Art Acevedo (@ArtAcevedo) May 18, 2018
That officer later returned and tied a tourniquet around Mr Barnes' arm, Mr Hatchett added.
He is currently on a ventilator, and his heart stopped twice on his way to hospital as he suffered severe blood loss, according to family.
On Saturday, doctors temporarily reduced his sedation allowing him to open his eyes and hear family members tell him they love him.
Mr Barnes joined the school police force earlier this year after 23 years with the Houston police department.
Friends say he retired to spend more time with his wife and two children, and live a "simpler life".
The officers' response is being contrasted with Parkland, Florida, school police officer Scot Peterson, who was criticised for lingering outside the school building as 17 people died during a six-minute shooting.