Important note: If you or a loved one is feeling distressed, please remember help is available through the National Suicide Prevention Lifeline at 1-800-273-8255. It provides free and confidential emotional support 24 hours a day, 7 days a week. You can also call a loved one, member of the clergy or 911.

SAN DIEGO — An inmate grabbed a deputy’s gun and fired it during a struggle at a San Diego hospital that left the deputy hurt Saturday, officials said.

The fight broke out around 3:30 p.m. as authorities prepared to take an incarcerated person back to jail after they received medical treatment at Scripps Mercy Hospital in Hillcrest, the San Diego County Sheriff’s Department said in a news release.

Deputies say the inmate, who they did not provide any identifying information about, attacked the deputy and “tried to gain control of his firearm.” As the two struggled, the deputy’s gun came unholstered and the incarcerated person grabbed the weapon, firing at least once, according to officials.

Deputies eventually subdued the person using “multiple force options” and got back the gun, authorities wrote. They did not provide further details about their use of force.

The fight left the deputy with a broken hand and wrist, but no one was shot.

“A check of the hospital was conducted as a precaution,” the sheriff’s department said. “Thankfully no one was injured by the gunfire and there was no evidence that any bullets left the hospital room where the incident occurred. The hospital resumed normal operations shortly thereafter.”

Detectives are continuing to investigate the attack, and the inmate is being evaluated at the San Diego County Psychiatric Hospital, because they “made suicidal statements during the fight,” officials said.

The incident came on the same day that a 40-year-old woman died while in the department’s custody at a local hospital. Authorities released few details about the cause of the woman’s death, saying that an autopsy Sunday would reveal more information.

The department remains under scrutiny over a higher-than-average rate of deaths in county jails in recent years, which is now the subject of a class-action lawsuit. That issue has factored heavily into the race for San Diego’s next sheriff, after the retirement of incumbent Bill Gore.