FOLSOM (CBS13) – An inmate at California State Prison, Sacramento has died after being shot by a correctional officer.

The incident happened Thursday morning. California Department of Corrections and Rehabilitation officials say an unnamed inmate started attacking inmate Eric Rodriguez in the prison’s main yard.

READ MORE: One Child Rescued, 3 Adults Missing In Sacramento River Near Rio Vista

Guards say Rodriguez was stabbed several times with an inmate-manufactured weapon.

READ MORE: What's Open And What's Closed This Fourth Of July

Somehow, Rodriguez was able to wrestle the weapon away and started stabbing the other inmate. A correctional officer then fired a lethal round at Rodriguez, hitting him.

Rodriguez was soon pronounced dead. The inmate who attacked him has been taken to a hospital outside the prison to be treated for multiple stab wounds.

MORE NEWS: Firefighters Rescue Kitten Trapped In Tennessee Walmart Pepsi Machine

Officials say Rodriguez had been at CSP-Sacramento since April to serve a four-year assault with force sentence.