BAKERSFIELD, Calif. (KGET) — During an argument last year, Jaime Celestino Hernandez fired a gun, nearly striking the woman he quarreled with in the head, the bullet passing through kitchen and closet walls.

Four children were home at the time.

On Thursday, Hernandez, 38, was sentenced to 18 years in prison. He was found guilty in January of child cruelty, spousal abuse and firearm-related charges.

After the shooting, Hernandez assaulted the woman and stopped her from calling 911, prosecutors said. He then left and stopped by a neighboring apartment, where he discarded the gun.

Hernandez has a prior conviction for spousal abuse, according to court records.