The father of the 5-year-old Anchorage child who shot and killed himself with a gun Tuesday morning has been arrested on federal charges in the wake of the shooting.

Anthony L. Johnson, 30, was charged with being a felon in possession of a weapon in U.S. District Court, according to federal records. The charges follow the death of 5-year-old Christian Johnson, after he shot himself with a handgun on the 5700 block of Rocky Mountain Court at about 12:30 a.m.

Police had said Tuesday that the weapon -- retrieved from a nightstand drawer before the shooting -- belonged to one of the child’s parents, who were in other parts of the home at the time.

"What we heard in court is that the firearm was actually kept in the same drawer where the candy is kept in the house -- and I think we can all agree that that's not a good location and Mr. Johnson was a felon in possession of a firearm and he should not have possessed the firearm in the house let alone near the candy," said Chloe Martin, a spokeswoman for U.S. Attorney for Alaska Bryan Schroder.

A federal affidavit supporting the charges said that officers recovered a .40-caliber semi-automatic pistol from the home’s master bedroom, as well as roughly 110 rounds of ammunition in .40 and other calibers.

A check by the federal Bureau of Alcohol, Tobacco, Firearms and Explosives of Anthony Johnson’s criminal record revealed that he had been convicted of possession of a controlled substance with intent to distribute in May 2012.

Kimberly Sayers-Fay, the assistant U.S. Attorney prosecuting the case, said in court that Johnson recently tried to purchase a gun in Mississippi, but a background check flagged his criminal record. Sayers-Fay said that’s a detail that would typically cause her to push for a defendant to remain in detention, but this case is unique.

Johnson has a funeral to go to.

“The government is not immune to the consideration of compassionate things like a man should be able to attend the funeral of his child,” said Sayers-Fay.

The court worked out an agreement to make that happen. Johnson is released on ankle monitoring for four days with his fiancé and the child’s mother, Jualisa House, as a third-party custodian.

House told the judge, “I know Anthony. Sometimes he doesn’t listen until something like this happens. I hope this is an eye-opener for him to how this was a bad decision.”

Johnson is supposed to return to court Monday so a long-term bail decision can be made.

Anchorage police spokeswoman Renee Oistad said no state charges in connection with Christian Johnson’s death had been filed Wednesday.

Editor's note: A previous version of this story included an incorrect spelling of the Johnson family's surname.

Copyright 2017 KTVA. All rights reserved.