Updated

A Tennessee sheriff says a deputy is in critical condition and needs prayers after being shot multiple times during a struggle with an inmate who was killed.

Robertson County Sheriff Bill Holt posted on Facebook Thursday morning that 36-year-old Deputy Josh Wiley still faces major surgery.

"In law enforcement, we train for the worst, but pray it never happens. Yesterday, an inmate viciously and violently attacked one of our deputies. Unfortunately, my deputies had to respond in the way no law enforcement wants to - with deadly force," Holt said.

A Nashville police statement says Wiley and Deputy Tomisha Jones were taking convicted bank robber 37-year-old Rodney L. Cole to a medical clinic Wednesday when the inmate asked to go to the bathroom and Wiley escorted him there.

The police statement says Jones heard her partner call for help and found Cole stabbing Wiley with a screwdriver. It says she fired at Cole, then the prisoner briefly gained possession of her weapon before she regained control and both deputies shot him. The statement says Wiley also was struck by gunfire and taken to Vanderbilt University Medical Center.

Police declined to comment further Thursday on the circumstances, saying the shooting is under investigation.

Detectives are working to determine how Cole obtained the screw driver. He was serving a 15-year sentence for bank robbery.