SAN JOSE — Told it would take two more years and up to $20 million to install more security cameras in Santa Clara County’s troubled jails, Sheriff Laurie Smith decided Wednesday to whip out her Costco card and buy a few herself.

The cost for 12 cameras to test: $761.24 — which Smith put on her personal American Express.

The sheriff’s shopping spree came as three of her correctional officers appeared in court Wednesday on charges of beating a mentally ill inmate to death in August — an incident that wasn’t captured by the jail’s existing cameras and exposed troubling surveillance gaps. Smith headed to the store after she learned that the county’s plan to buy cameras through official channels could drag on for two years. She denied it was a publicity stunt.

“It’s imperative we act swiftly,” Smith said Wednesday after returning from her trip to the Costco on Coleman Avenue. “There cannot be a delay because of bureaucracy. That’s unacceptable. Anything we can do to bring additional transparency, we want to do right away.”

A county work crew was set to install them by Thursday morning in maximum-security housing pod 4A, on the fourth floor of Main Jail South.

If the Lorex high-definition 1080-pixel system is as effective as advertised at capturing details like the faces of guards and inmates, the sheriff plans to buy more to bridge the gap until the county installs a better system in 2018. She said she consulted with county building department officials before going shopping and expects to be reimbursed.

Sprinkled throughout the two-tier pod, the cameras will capture views of the multipurpose room, the exercise yard and each of the 50 or more cell doors. To protect inmates’ privacy, no cameras will be installed inside the cells.

The video can be stored and reviewed for up to 30 days. But in the long run, a system capable of storing data for more extensive periods of time is essential, said Jeff Draper, director of the county’s Fleet and Facilities department.

“These Costco cameras are not a panacea,” Draper said. “It’s an interim system.”

But that system won’t be up and running for at least two more years, Draper said. It will cost an estimated $12 million to $20 million — and that does not include Main Jail South, the decrepit tower that is set to be replaced in three years by a new jail. According to the timeline Draper’s staff drew up, the county has to go through a multistep process that includes seeking bids from vendors, reviewing in-depth construction documents and testing security equipment.

The delay struck Smith as “ridiculous,” especially since she was able to quickly install a security camera system at own her house by purchasing it at Apple.

Six months ago, Smith and county supervisors promised the public that more jail cameras would be installed, after inmate Michael Tyree was beaten to death in late August.

Jail guards Jereh Lubrin, 29, Rafael Rodriguez, 27, and Matt Farris, 27, were charged with murdering Tyree and assaulting another mentally ill inmate, Juan Villa. The guards are currently free on $1.5 million bail each and on paid administrative leave.

A preliminary hearing for the guards this week underscored the necessity for more cameras. There is only one camera anywhere near the housing pod where Tyree and Villa were housed — and it’s actually trained on the hallway leading to the housing unit, not in the unit itself. The camera caught the three guards going into the unit but not what occurred inside. In the absence of any video, the guards’ lawyers have suggested this week that inmates killed Tyree or that the guards acted in self-defense.

Smith stressed that guards will also benefit from the cameras. The surveillance could deter inmates from attacking them or serve as evidence if guards are wrongly accused by inmates of mistreating them.

“Cameras are a good thing,” she said, “for everybody.”

Raj Jayadev, an activist with the civil rights group De-bug Silicon Valley, agreed. “Lives are quite literally on the line,” he said.

Julio Alvarez, acting president of the correctional officers union, said he also advocates cameras but would like the sheriff to act collaboratively, not unilaterally because “it hurts morale.”

LaDoris Cordell, who chairs the county’s Blue Ribbon Commission on Improving Custody Operations and is a frequent critic of the sheriff, said, “I have nothing but kudos for somebody who does that. But this should have been done long ago.”

Contact Tracey Kaplan at 408-278-3482. Follow her at Twitter.com/tkaplanreport.