At least nine prisoners suffered stab and gunshot wounds during a riot of about 50 inmates at a California prison on Wednesday that was eventually quelled, authorities said.

Some law enforcement officers also were slightly injured during the melee at California State Prison-Sacramento, said a statement from the California Department of Corrections and Rehabilitation.

The riot at the maximum security prison was contained, the department said. The prison is located just outside the state capital in the nearby town of Represa.

At least nine inmates wounded in the riot were transported to Sacramento area hospitals, corrections officials said.

It was not immediately clear if the prisoners wounded by gunshot had been fired upon by guards or other inmates, but the corrections department said prison staff had fired shots to quell the disturbance.

Guards also used pepper spray and rubber bullets to stop the riot, officials said.

In May, two inmates suffered multiple stab wounds in another riot at the same prison that involved 150 inmates, officials said at the time.

The 25-year-old facility houses about 2,800 inmates and employs more than 1,700 staff members.

The sprawling facility near the famed Folsom State Prison mainly houses maximum security inmates serving long sentences, and those who have proved to be management problems at other institutions, officials said.