The father of a 4-year-old boy who was killed when a handgun he found in their North Philadelphia home went off was charged Friday with involuntary manslaughter and other offenses in his son’s death.

Edward Williams, 28, who originally told police his son was shot during a home-invasion robbery, also was charged with filing false reports and tampering with evidence.

His bail was set at 10% of $1 million at a hearing early Friday, according to court records.

Police responding to a 911 call for the reported home invasion found Edward Williams Jr., 4, fatally wounded in a second-floor bedroom of the home on the 2100 block of North Lambert Street about 1 a.m. Thursday.

But after examining the scene and questioning the father, detectives concluded the boy found the 9mm handgun in a closet and it somehow discharged, Homicide Capt. Jason Smith said Thursday.

Detectives do not think the father was with his son at the time, but a 3-year-old sibling was, Smith said.

Besides manslaughter, Williams was charged with endangering the welfare of children, reckless endangerment, corruption of minors, and weapons possession in the shooting.

He also was charged with drug-possession offenses.

A preliminary hearing is set for Feb. 19.