FOLSOM, Calif. (AP) — For the second time in a week, California prison guards have shot and killed an inmate to break up a prison assault.

Authorities say 27-year-old Eric Rodriguez died Thursday at California State Prison, Sacramento after another inmate stabbed him with a home-made weapon.

Authorities say Rodriguez grabbed the weapon and began stabbing his attacker. A guard then fired a rifle shot that killed him.

The other inmate was taken to a hospital for treatment of his stab wounds.

Rodriguez had recently begun serving a four-year sentence for assault.

On Monday, a guard fatally shot 31-year-old Daniel Gonzales at the California Substance Abuse Treatment Facility and State Prison in Corcoran.

Authorities say Gonzales and another inmate were attacking a third inmate when he was killed.