CROWN POINT, Ind. (AP) — A northwestern Indiana man who pleaded guilty to fatally shooting his 9-year-old daughter as he was talking to her two brothers about gun safety won’t serve any prison time for her 2017 death.

A Lake County judge sentenced Eric S. Hummel, 38, on Thursday to one year to be served in the county’s community corrections program while living at home, followed by 3 1/2 years of probation.

Judge Natalie Bokota accepted the Hobart man’s guilty plea to reckless homicide and neglect of a dependent charges in Olivia Hummel’s death, The (Northwest Indiana) Times reported.

Prosecutors had sought an 8 1/2-year prison sentence for Hummel, but Bokota she said she agreed with Hummel’s attorneys that incarcerating him would result in further trauma to his boys.

According to court records, Hummel said he was showing a handgun to his sons and telling them to never play with it “because it can kill someone” when he accidentally shot and killed his daughter.

Hummel told a 911 dispatcher he didn’t realize the gun was loaded when he pulled the trigger.

He admitted in his plea agreement that he was talking to his sons about gun safety in a bedroom of his Hobart home in June 2017, when he pointed a handgun at the boys and pulled the trigger.

The handgun did not expel a projectile at that point, but pulling the trigger caused the firing pin to become engaged, according to court records.

When Olivia joined her siblings and father in the bedroom, Hummel pointed the gun at her and pulled the trigger. She suffered a gunshot wound to her head and died at a hospital.