San Jose police Sgt. Matt Walsh was released from the hospital Saturday after he was shot following a chase of an armed robbery suspect.

“On behalf of your community, a grateful city, and your brothers and sisters, thank you, Sergeant Walsh, for fighting through to keep San Jose safe and for making sure your team returns home safely at the end of each shift,” said a post from the San Jose Police Department on X. “We know your journey through recovery will be a fight you’ll tackle with the same focus and bravery.”

Walsh was shot Tuesday after an armed robbery suspect fled arrest and ran into a home for refuge. Officers then entered the home, ushered out the residents and confronted the suspect in a backroom of the house. In a shootout, the suspect, 39-year-old Anthony Ross Chavez of Campbell, allegedly shot Walsh twice in the torso; Walsh and one other officer shot Chavez multiple times, killing him.

Walsh was taken to Valley Medical Center on Tuesday, where he was treated. He walked out this weekend, welcomed by rows of officers as well as Mayor Matt Mahan.

Staff reporters Robert Salonga and Jason Green contributed to this report.