A Philadelphia man has been arrested after a 2-year-old boy critically injured himself by accidentally discharging a firearm, police said.

According to authorities, 20-year-old Rahmir Ponzo was taken into custody and charged with endangering the welfare of a child and recklessly endangering another person. The charges stem from a shooting incident that occurred around 1:45 p.m. on May 5 inside a residence in Philadelphia, CBS News reported.

Police said the toddler found a firearm in a bedroom and accidentally fired it, striking himself in the abdomen. Responding officers discovered the child with a gunshot wound and rushed him to the hospital, where he remains in critical condition as of Tuesday, May 6.

Authorities have not disclosed Ponzo’s relationship to the child or the circumstances surrounding how the firearm was accessed.

The investigation is ongoing.