SAN JOSE (CBS SF) — Brand new surveillance cameras at the Santa Clara County Main Jail captured an possibly racially charged fight involving up to 30 inmates that put the facility on lockdown Thursday afternoon.

The brawl was caught on surveillance cameras paid for out of the Santa Clara County Sheriff’s pocket that were just installed Wednesday, according to authorities.

Initial reports of the fight surfaced at about 3:30 p.m. Sources said about 30 inmates were involved in the fight. Jail medical staff were treating injured inmates, but there was no word on exactly how many people were injured.

As of 7:30 p.m., the jail was no longer on lockdown, except for the immediate area where the fight occurred. Santa Clara County Sheriff Laurie Smith said the racially motivated fight was in the jail’s maximum security pod 4A.

The video showed two inmates apparently bumping into each other before they begin fighting. Many others joined the fray.

“It looks like one inmate brushed up against another, then the fight is on. You can see a lot fist fighting going on in the videos,” said Smith. “The inmates are spread throughout the pod.”

Several inmates were injured, but none of the injuries were life threatening.

Many inmates were coughing and wheezing due to pepper spray used to subdue those involved, sources said.

ALSO READ>>Santa Clara County Sheriff Uses Her Own Money To Buy Jail Cameras

The fact that the brawl was caught on camera was by complete chance.

“That’s where we installed the cameras,” said Smith. “We don’t have cameras in any of the other housing areas and they only went in last night, so it’s interesting it happened here.”

Though the inmates involved were mostly black and Hispanic inmates, Smith would not confirm that the fight was racially motivated.

“It appears along racial lines just by viewing the video, but I’m not certain that that is true,” said Smith. “The investigation is just beginning.

KPIX 5 got the first look at the new security cameras Wednesday as they were installed in a maximum security pod.

“If it’s going to take two years to get a new system in, these are great in the interim,” Smith said.

On Wednesday, county officials told the sheriff it would take two more years and $20 million before any more cameras made it inside the jail.

So Smith took matters into her own hands and bought 12 security cameras using her own credit card and Costco membership.

The sheriff spent about $760 on 12 Lorex high-def cameras that capture views of the multi-purpose room, exercise room and each of the 50 jail cell doors.

Smith said, “We didn’t want to get hung up in the bureaucracy and the red tape. We wanted cameras in the facilities.”

The gaps in the main jail’s surveillance system were exposed after three correctional deputies were accused of fatally beating inmate Michael Tyree at the same jail last August. That incident was not captured on camera.

Late Thursday, a San Jose judge ruled that those deputies will stand trial for the murder of an inmate. The guards are also accused of assaulting another mentally-ill inmate who testified Wednesday that he would have died, had he resisted.