BAKERSFIELD, Calif. (KGET) — Believing his significant other had been unfaithful, Marcos Viveros threatened to kill her and pointed a gun at her head.

She knocked the weapon aside and it fired by her ear, prosecutors said.

Viveros on Wednesday was sentenced to 26 years and eight months in prison for that incident and another where he was found guilty of assaulting the woman by punching and kicking her.

Charges filed in the shooting, which occurred in 2019, were dismissed after the woman refused to cooperate but refiled following the second assault. Prosecutors said she was compelled to testify due to the seriousness of the allegations and told the court about the abuse she suffered.

In all, a jury last year convicted Viveros, 24, of attempted murder, assault with a gun, making terroristic threats, recklessly discharging a gun, spousal abuse, robbery, stalking and being a felon in possession of a gun and ammunition.