A North Carolina man was detained Thursday after authorities said he fired a gun, sending a bullet through the bedroom of a neighbor's child WRAL reported.

>> Read more trending news

The man had been “messing around with a handgun” in the Zebulon neighborhood when it accidentally discharged, Zebulon police Chief Tim Hayworth told the television station. No injuries were reported.

Police said the exit hole from the bullet was found in a neighboring home, WRAL reported. When authorities approached the home from which the gun had been fired, a man inside refused to come outside, the television station reported.

Police surrounded the house, but the man, who has not been identified, came out of the house with a woman and surrendered to police, WRAL reported.

The man was charged with shooting into an occupied dwelling, the television station reported.