VISTA, Calif. — The San Diego County Sheriff’s Department on Tuesday released bodycam video of a deputy opening fire on an armed man outside a Vista church after the man refused to drop his handgun, authorities said.

On May 7, authorities responded to a report of a man holding a handgun to his head in the 1400 block of Calle Jules, according to the San Diego Police Department.

The video shows deputies talking to churchgoers at the scene when a man is seen emerging from a breezeway with a gun in his hand.

Law enforcement shouted multiple commands for the 77-year-old suspect to drop his weapon, but the man refuses. A deputy, identified as Justin Williams, then fires his handgun, striking the suspect in the legs.

Authorities can be seen arresting the man and rendering first aid. The suspect was taken to the hospital with non-life-threatening injuries, police said.

The identity of the suspect is being withheld at this time, according to SDPD.

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.