Officer who confronted Santa Fe gunman on road to recovery

John Barnes was hospitalized in critical condition after the May 18 shooting.

The officer who was injured when he confronted a shooter at a Texas high school last month is on the road to recovery.

When a 17-year-old student allegedly opened fire at the school on May 18, Santa Fe Independent School District police officer John Barnes was wounded and taken to The University of Texas Medical Branch in Galveston in critical condition. He has since been moved to another facility.

Barnes, a husband and father, "would drop everything and go in there," Houston Police Captain Jimmy Dale told ABC News shortly after the shooting.

"And he knew with an active shooter, to eliminate the threat, any second you waste is a life lost and he wasn't going to let that happen," Dale said.

Houston Police Chief Art Acevedo said he visited Barnes in the hospital on Monday.

"Although the road to recovery will be long and hard, he is in great spirits and looked great," Acevedo wrote on Twitter.

The suspected shooter, Dimitrios Pagourtzis, allegedly killed 10 students and staff and injured 13 others inside the school before he was taken into custody. He was charged with capital murder.

ABC News' Jim Scholz contributed to this report.