If you or anyone you know needs help, the Suicide & Crisis Lifeline can be reached at 988. The hotline is available 24 hours a day.

VISTA, Calif. — An apparently suicidal man was shot by a deputy at a North County church on Sunday, according to the San Diego Sheriff’s Department.

Shortly before 12:30 p.m., patrol deputies were dispatched to the church located in the 1400 block of Calle Jules in Vista after a man was reportedly at the location holding a handgun to his head.

When deputies arrived on scene, they learned that other members of the church were inside the building with the man, according to San Diego Police Department Lt. Adam Sharki in a release.

As deputies attempted to gather more information, Sharki said responding law enforcement noticed the man exit the church with the firearm in his right hand. Deputies gave commands to the man to drop the gun, according to SDPD.

When the man failed to follow the demands of law enforcement, one deputy fired a single shot from his department-issued rifle, striking the man in his legs. The man proceeded to drop the handgun, Sharki said.

Paramedics performed a first aid to the man, described by SDPD as a 77-year-old. He was then transported to a local hospital. His injuries are not considered life-threatening.

No other injuries were reported in the incident, according to SDPD.

Sharki said the deputy involved in the shooting has been employed by SDSO for approximately three years and is currently assigned as a patrol deputy from the Vista Substation.

The SDPD Homicide Unit is conducting the investigation into the deputy-involved shooting, per the Countywide Memorandum of Understanding. Anyone with information regarding the incident are asked to call the SDPD Homicide Unit at 619-531-2293.

FOX 5’s Amber Coakley contributed to this report.