DETROIT -- A Detroit man convicted in the death of his 9-year-old son who was shot by an older sister while the children were acting out a video game has been sentenced to 25 to 50 years in prison.

The 45-year-old man apologized on Monday in court, saying he loves his children. He was convicted of involuntary manslaughter, child abuse and several weapons charges.

The boy and his 11-year-old sister were visiting their father Nov. 9 and the loaded gun was unsecured in a bedroom closet. The girl testified that she and her brother were acting out a video game and that she had the shotgun when it fired.

She was granted immunity from prosecution in exchange for her testimony. The Associated Press isn't naming the family members so as not to identify the girl.