FOLSOM, Calif. (AP) — Guards have killed an inmate and critically wounded another at a California state prison.

The state corrections department says it happened Friday afternoon at the prison in the Sacramento area as guards tried to break up a fight in the recreation yard of the prison, which is in Folsom.

Authorities say two inmates armed with stabbing weapons attacked a third man.

Guards used pepper-spray grenades and other non-lethal weapons and fired a warning shot from a rifle. But officials say the attack continued and another inmate joined in.

A guard then fired two more rifle shots, striking two inmates. Thirty-eight-year-old Jamie Mardis died. The other inmate is in critical condition.

Two other inmates were treated for minor injuries.

Mardis was serving 11 years for robbery and another two years for carrying a deadly weapon in prison.