Inmate fatally shot during fight inside California prison (VIDEO)

The prison, which opened in 2005, holds nearly 3,800 inmates of all security levels and employs around 1,800 people. (Photo: ABC)

The prison, which opened in 2005, holds nearly 3,800 inmates of all security levels and employs around 1,800 people. (Photo: ABC)

An inmate at a California prison is dead after he was shot Wednesday morning by a corrections officer who appeared to have fired in defense of another inmate.

Around 10:15 a.m., two inmates began assaulting a third inmate at Kern Valley State Prison in Delano, about 30 miles north of Bakersfield. The attack continued and the third inmate was eventually knocked unconscious, a local ABC affiliate reported. While that inmate laid on the ground, unresponsive and unable to defend himself, a corrections officer attempted to stop the fight but was initially unsuccessful.

The officer, who was armed with a Mini-14, first fired a warning shot, but the two inmates continued to beat the third, unconscious inmate. The officer then fired a second shot, striking one of the attacking inmates in the chest.

The inmate who was shot, later identified as 27-year-old Jose E. Herrera, was airlifted to an area hospital, where he was pronounced dead a short time later. The inmate who was being attacked was also transported to the hospital for medical treatment. He reportedly suffered from head trauma and his current condition is unknown. No other injuries were reported.

“The use of deadly force is always a last resort,” said Dana Simas, spokesperson for the California Department of Corrections and Rehabilitation.

Simas added that the loss of any life is unfortunate and the incident, like all in-custody deaths, will be thoroughly investigated.

Wednesday’s shooting is one of several recent incidents at the prison.

Earlier this month, 37-year-old Damion Soward, who was serving an 82-year sentence for murder, was found unresponsive in his cell and later died after being transported to the hospital, local media reported. Soward was the cellmate of former NFL running back Lawrence Phillips, who is suspected of his murder.

In a similar, yet unrelated incident, 41-year-old Rattanak Kim, who was serving 35 years to life for conspiracy to commit murder, was also found unresponsive in his cell and later died of what appeared to be strangulation. Kim’s cellmate, 24-year-old John Munoz, who is serving 42 years for a multitude of charges, including rape and burglary, is accused of killing Kim.

Both Phillips and Munoz were placed in solitary confinement.

On Monday, an officer on guard outside of the facility was shot in the torso when 15-20 high-caliber rounds were fired at the prison. Although the bullet penetrated the officer’s stab-resistant vest, the injuries were minor, and he was treated and released.

Authorities do not have any suspects in custody, and it’s unknown whether the corrections officer was a specific target.