Authorities say it all started just after 12:30 Saturday morning.
That's when an officer discovered the suspect, 41-year-old Angel Garza, inside a parked patrol car armed with a police rifle.
Investigators believe Garza tampered with the ignition -- removing the firearm from its security lock.
"He was able to get the electronics going and eject the rifle out of its locking mechanism," says Chowchilla Police Commander Jeff Palmer.
Palmer says officers tried to deescalate the situation. They repeatedly demanded Garza exit the vehicle -- but he refused.
That's when the suspect pointed the rifle at officers.
"At one point, he raised the rifle to his shoulder while inside the car, which forced the officers to have to engage the suspect inside the car with their firearms," Palmer said.
Garza didn't pull the trigger, but three officers fired more than 10 rounds -- hitting the suspect.
Palmer says Garza was able to easily access their property since there's no fence securing their facility.
This has opened officers to attacks in the past. In 2019, an officer was ambushed by a knife-wielding man.
Palmer says prior to that, another officer was attacked by someone who trespassed onto the property.
About 10 months ago, the City of Chowchilla approved the construction of a fence, but that has since been delayed, leaving the police department open to risk.
"Between the engineer and some of the architectural issues that have happened, it has delayed the project quite a bit," Palmer said.
Palmer says Garza was airlifted to the hospital, where he's currently in a coma. He adds the suspect has a history of drug use and has had prior run ins with the law.
All three officers have been placed on paid administrative leave. The Madera County Sheriff's Office is now taking over the investigation.