A total of eight California prison guards and seven inmates were taken to hospitals after a fight between two inmates Wednesday quickly raged out of control into a riot that took live ammunition to stop, officials said.

Correctional officers fired 19 bullets from semi-automatic rifles and three hard foam rounds to break up the melee at Pelican Bay State Prison, located in Crescent City near the Oregon border, the California Department of Corrections and Rehabilitation said in a news release.

Five of the seven injured inmates suffered gunshot wounds, according to prison officials. One of the inmates was airlifted to a different hospital for a higher level of care, Terry Thornton, a spokeswoman for the California Department of Corrections and Rehabilitation, told the Associated Press the three other inmates were admitted to hospitals and two were discharged back to prison.

All of the injured guards were treated and released from local hospitals. Thornton said one of those officers will eventually need surgery for an injured shoulder.

"They all had like facial injuries, bumps, bruises, contusions," she told the AP. "It's a frightening incident. It's frightening to have inmates just swarm you ... to overwhelm you and attack you."

Officials said the melee began when two inmates refused to break up a fistfight at the high-security prison around 10:25 a.m. in a maximum-security general population yard.

Large groups of prisoners then ran toward the fight and attacked the guards. Responding staff used chemical agents and batons to subdue the inmates, but they refused to stop fighting, according to state officials.

Prison officials said two inmate-made weapons were recovered, but it does not appear at this time they were used in the attack.

The California Department of Corrections and Rehabilitation sent a Deadly Force Investigations Team to the prison to conduct the criminal and administrative investigation into the incident.

Ninety-seven inmates were isolated in a disciplinary housing unit after the assault.

"As the investigation progresses, we'll have a better idea how many inmates were actually involved. But the fact that the 97 inmates were rehoused indicates they had some level of involvement," Thornton said.

Investigators don't yet know whether it was a planned attack on correctional officers or if it was gang-related, she said.

Counselors were sent to the prison to help employees recover.

"We're encouraged that the officers weren't injured more than they were," Thornton said.

Pelican Bay State Prison located in Del Norte County, is made up of two maximum-security facilities, two security housing unit facilities, a minimum-support facility and a short-term restricted housing unit, according to the California Department of Corrections and Rehabilitation.

The prison opened in 1989, currently houses approximately 2,000 inmates and employs approximately 1,300 people.

The Associated Press contributed to this report.