As authorities searched for a missing 6-year-old boy for more than five hours Wednesday night, their investigation was hampered by a man with a laser, officials said.

The child was eventually found snoozing beneath a pile of clothes inside a closet of his Metropolitan Parkway home when his family discovered him about 11:45 p.m., according to Channel 2 Action News. He had been reported missing about 6:30 p.m. when his father returned from the store and could not find him, the news station reported.

But the incident resulted in an arrest after someone on the ground caused harm to a crew searching for the child from the police department’s helicopter, according to police. The pilot said his night vision device was hampered when a man inside a house on Bonnie Brae Avenue began shining a green laser into the aircraft about 11:10 p.m.

In a video posted to Twitter, a green light appears to shine directly into the cockpit and temporarily disables the night vision.

The pilot was able to direct officers on the ground to the home, where the suspect was arrested, police said in a news release.

“At the location, the officers contacted the suspect who admitted pointing a laser at the aircraft,” the release said. “A laser pointer device was taken as evidence.”

The man was detained in a squad car before he was released on a copy of his charges of using a laser against a law enforcement officer and against an aircraft. His name was not released.

According to Channel 2, the 6-year-old boy was in good health when he was found.