The dramatic confrontation occurred about 9:15 a.m. on March 21, after deputies responded to the 100 block of Bond Road searching for Cristian Castaneda, Sheriff Chad Bianco said in a video briefing released Wednesday.
According to authorities, a felony warrant had been issued for Castaneda on the charge of assault on a peace officer with a firearm, following an incident that had occurred during a traffic stop the previous evening.
"During that traffic stop, Castaneda pointed a loaded gun at one of our deputies," Bianco said. "Fortunately, when he pulled the trigger, the gun malfunctioned and did not fire."
The suspect then got back into his vehicle and fled the scene, investigators said. A brief pursuit ensued, after which Castaneda abandoned the vehicle and ran. A passenger was detained.
Authorities later learned that Castaneda frequented a home on Bond Road. When several deputies and a sheriff's sergeant went to the location on March 21, residents there told them that Castaneda was inside in a bedroom.
Body camera footage shows the moment when Castaneda opens fire from inside the mobile home as deputies are bringing residents out of the trailer, according to authorities.
"Shots fired! Shots fired!" the deputies are heard shouting. "Get down! Get down!" they yell, escorting the residents to take cover behind a nearby pickup truck.
Other deputies are pinned down on the other side of the home, unable to immediately move to safety.
The sporadic gunfire from inside the trailer continues, and one of the deputies yells out in pain.
"Am I hit?" the deputy says, cursing as he realizes he has been struck in the chest. He then says to a fellow deputy: "I don't know if I'm bleeding, bro. We gotta run that way."
Orange mass shooting survivor released from hospital
At least one of the deputies then returns fire on the gunman.
A help call was broadcast to surrounding law enforcement agencies, who descended upon the scene along with medical personnel.
Two of the Sheriff's Department's armored vehicles arrived at the home and helped the pinned-down deputies and residents escape from the line of fire. The wounded deputy was transported to a hospital with injuries that were not life-threatening, officials said.
The sheriff's Special Enforcement Bureau surrounded the trailer and made efforts to have Castaneda come out, but were unsuccessful, Bianco said.
A robotic vehicle was deployed into the structure, where the gunman was found dead, authorities said. A handgun and multiple rounds of ammunition were recovered.