A 20-year-old man entered a home's unlocked front door, snatched a 4-year-old girl from her bed and bound and stuffed her into a wooden trunk at his grandparents' house, telling police he'd been scoping out children who he thought lived in "deplorable conditions," authorities said.

The child was reported missing at 3:30 a.m. Thursday and somehow managed to escape a few hours later that morning. She was found safe near the house where Thomas Dewald had been staying in Waynesboro, about 165 miles (265 kilometers) west of Philadelphia, near the Maryland line, Pennsylvania State Police said.

"No parent or child should ever have to worry about whether they're safe in their homes," State police Lt. Mark Magyar said late Monday.

On Monday, a state trooper investigating the kidnapping spoke to Dewald's grandmother, since her red brick house matched the child's description. The woman told the officer she had entered her grandson's room in previous days to see if he had made his bed, and thought she heard a baby crying near a wall air conditioning unit, the affidavit said. She said she couldn't find the source of the crying, and Dewald had already left for work. The woman told police he'd been staying with her for about four or five weeks.

Troopers searched the home and found a wooden trunk under the air conditioning unit. Inside it was black tape covered in blonde hair, dirt and grass, the affidavit said.

Dewald returned home as the troopers wrapped up the investigation and police say in the affidavit that he admitted to taking the girl.

He told troopers he had been canvassing neighborhoods, looking for unsupervised children who seemed to live in "deplorable conditions" and in homes with no video surveillance nearby, the affidavit said. He went on to tell them he entered the 4-year-old's home and after an hour inside decided to take her based on the condition of the house, according to the affidavit. Police allege he told them he considered taking the girl's brother, but decided he was "too heavy" to carry down the stairs.

According to the affidavit, he told police he "might" have touched the girl inappropriately once in his room at his grandparents' house. Police say he told officers he then taped the girl's wrists, ankles and mouth and put her in a wooden chest, telling her he would be home from work around noon.

At about 9:30 a.m. on Thursday, the girl escaped the residence, police said.

According to the affidavit, Dewald told troopers he broke into another home on Sunday, intending to take one of the three children residing there, but decided their living conditions were acceptable. State police also say he was frightened by the family dog. He also put tape on the bottom of his shoes so he wouldn't leave shoe prints, the affidavit said.

Dewald was arrested and faces multiple charges in both incidents, including kidnapping, criminal attempt kidnapping, burglary, false imprisonment, unlawful restraint, criminal trespass and indecent assault.

No attorney is listed in online court documents. A phone listing for Dewald's grandparents rang busy Tuesday. Dewald remains in Franklin County Jail.