Sheriff Ed Gonzalez identified his injured officer only as Deputy Barragan. He did not provide his first name.
Moises Martinez, 37, who is accused of shooting Barragan, was detained following a four-hour manhunt in north Harris County.
It all began at a gas station in the 1200 block of Forestburg Drive just before 6 p.m. Tuesday. According to Sheriff Ed Gonzalez, two deputies were responding to a call for service regarding a suspicious person.
When deputies arrived at the scene, they found Martinez, who pulled out a weapon and began firing toward the deputies. During the incident, one of the deputies was shot in his hands and his back, but his vest protected him. A second deputy at the scene was able to fire back at Martinez but did not hit him.
A neighbor's Ring doorbell camera captured the sounds of the shooting.
"You know this individual clearly was, was not in a good place right now and, you know, I'm glad our deputies intervened, because who knows what else he could have done?" Gonzalez said.
WATCH: Surveillance video captures exchange in gunfire between deputies and suspect
Martinez reportedly had two felony warrants out for him. According to court records, one of Martinez's warrants dates back to October 2020, when he was taken into custody after a five-hour standoff. Records state the standoff started when Martinez's mom accused him of robbing her.
Barragan was taken to Northwest Houston Hospital, where he was said to be alert and conscious. He is expected to recover from his injuries.
"Very relieved to find out that our deputy is going to be okay," said Gonzalez during a briefing with reporters on Tuesday night. "He is stable. He's conscious. He gave me a thumbs up. He was smiling."
The other deputy who was part of the shootout was not hit.
Gonzalez said Barragan has been with the Harris County Sheriff's Office for about 18 months and served with another local agency for about six years.
In Tuesday's shooting, Barragan became the sixth deputy shot or shot at so far in the Houston area this year. None of those deputies have died.
Four officers across the country have been shot and killed so far in 2021.
Follow Courtney Fischer on Facebook, Twitter and Instagram.
Follow Jessica Willey on Facebook, Twitter and Instagram.
Follow Mayra Moreno on Facebook, Twitter and Instagram.
Follow Stefania Okolie on Facebook, Twitter and Instagram.