The hero school police officer who was shot while confronting the gunman during Friday’s mass shooting in Santa Fe, Texas, “flatlined” twice afterward and might lose his arm, but a friend and relative say they believe he will survive.

Ten people were killed and 13 were injured during the shooting at Santa Fe High School, but the toll could have been much worse had not school police officer John Barnes, 49, confronted the gunman. Governor Greg Abbott said Barnes and another officer arrived “early in the process,” adding, “Their actions probably ensured that more lives were not lost.”

Frank Flaherty, the husband of Barnes’ cousin, tells PEOPLE that Barnes, a former Houston police officer who became a Santa Fe Independent School District officer in 2018, was the first to respond to the art classroom in which the shooting took place and was shot multiple times while opening the door.

Captain Jim Dale, a Houston police captain and friend of Barnes’, said after Barnes confronted the suspect, a Texas Department of Public Safety officer shot one round at the suspect, at which point the 17-year-old suspect surrendered.