It happened at about 3:30 pm Thursday in Oakhurst along road 425B after a chase that started in the town.
Madera County Sheriff's deputies initially responded to a hit-and-run driver behind the wheel of a stolen truck.
An Oakhurst man, who asked us not to share his identity, says he was out shopping when he saw his stolen truck at this shopping center.
He says he immediately decided to chase the thief down.
"When I came out of O'Reillys and saw it there. I said we're getting the truck back today and we did," the man explained.
The wild chase went all through the Oakhurst with the suspect even ramming the car the victim was in.
It finally ended in a neighborhood on Road 425 B when the suspect, now identified as 41-year old Allen Scott Williams, got out of the truck and ran.
Car theft victim speaks out after chase ends with suspect, K9 being shot in Madera County
That's when sheriff's deputies stationed at the base of the mountain deployed K9 Obie to chase him down.
They say moments later, Williams turned around and fired a shotgun right at the two year old Dutch Shepherd.
"Our beloved canine OB is just riddled with shotgun pellets all throughout his torso very concerning situation," said Madera County Sheriff Tyson Pogue.
Deputies fired back, hitting Williams.
Williams was on probation for felony possession of ammunition and had several warrants for his arrest.
"This guy he is a career criminal. He is known for vehicle theft. He has no disregard for public safety. He was a dangerous individual and we're extremely lucky that no deputies were injured," said Sheriff Pogue.
The sheriff says that's thanks to Obie, who is now being hailed a hero.
"They K9 came up to contact the suspect and instead of shooting at the deputies, the suspect shot the canine so in this instance can I know he was a hero he potentially saved a deputy's life," Sheriff Pogue said.
As law enforcement swarmed the scene, securing the area and tending to Williams, Nick McBeath, a sheriff's search and rescue volunteer, sprung into action to help the Obie.
He loaded Obie into his car and rushed him to a waiting deputy who drove the K-9 to a North Fresno pet hospital.
McBeath is being hailed a hero in his own right, but he doesn't see it that way.
"I don't feel like a hero, ma'am. I feel like I did what anybody else would have done, and that was help an officer or deputy in need," said McBeath.
McBeath was just the start as the community is now jumping in on Obie's healing journey.
Madera local Ken Moore says as he was headed into the office Thursday, he decided to stop by the sheriff's office to see how he could offer support for K-9 Obie.
"I bought a shirt to support our K9s and any other help that I might be able to offer in the future, I'm there for them. Obie's a hero. It's a tragedy that he got hurt. I hope the best for him," said Moore.
If anyone would like to support K9 Obie during this time, donations can be made to the Madera County Sheriff's Foundation in the following ways:
- PayPal: @MaderaCountySheriffsFoundation
- Venmo: @mcs-foundation
- Check: Madera County Sheriff's Foundation
- In Person: 2370 W Cleveland Ave., Suite 108 #201, Madera, CA 93637
For news and weather updates, follow Brisa Colon on Facebook, Twitter and Instagram.
For news updates, follow Kate Nemarich on Facebook, Twitter and Instagram.