A 20-year-old Pennsylvania man was arrested Monday after he took a 4-year-old girl from her bed in the middle of the night, bound and stuffed her into a trunk at his grandparents' home last week before she escaped, according to officials.

Pennsylvania State Police said that Thomas Dewald admitted to troopers he canvassed neighborhoods and looked for unsupervised children who he thought lived in "deplorable conditions" before taking the girl on Thursday from her home Washington Township.

He then brought her about a mile away to the home where he was staying in Waynesboro, located about 165 miles west of Philadelphia, near the Maryland line. He lived about a mile from the girl's home.

"The community affected by his cowardice actions can rest easy knowing this animal is in custody," State police Lt. Mark Magyar said late Monday.

MASSACHUSETTS MAN ACCUSED OF BITING GAS STATION CLERK, TELLING WITNESS: 'I DON'T EAT FLESH, I JUST DRINK BLOOD'

When he was brought past reporters on Monday, Dewald raised a middle finger and did not respond to any questions, FOX43 reported.

Investigators said that Dewald took the girl to his grandparent's house where he locked her inside a wooden chest, telling her he would be home from work around noon until she somehow escaped around 9:30 a.m.

According to an affidavit obtained by the Associated Press, he told police he "might" have touched the girl inappropriately once in his room at his grandparents' house.

After the girl escaped and discovered by a bystander, police allege that Dewald admitted to breaking into another home on Sunday intending to take one of the three children residing there, but decided their living conditions were acceptable in addition to being scared off by the family dog. He also put tape on the bottom of his shoes so he wouldn't leave shoe prints, according to state police.

UNC CHARLOTTE SHOOTING VICTIMS IDENTIFIED, AS SUSPECT SEEN SMIRKING WHILE IN CUSTODY

Authorities investigating the kidnapping on Monday spoke to Dewald's grandmother due to the red brick house matching the description given by the girl. The woman told police she thought she heard a baby crying near a wall air conditioning unit, but couldn't find the source.

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

CLICK HERE FOR THE FOX NEWS APP

Larry McFadden told FOX43 it was "terrible" to hear what his grandson allegedly did.

"It's pretty hard to deal with, obviously. I don't know the grandson you're describing, obviously," McFadden told the television station. "The grandson I knew was expecting to be... starting his career, and he's a very religious boy. At least, I thought he was, and he's very intelligent. That's the hard thing to accept cause this certainly isn't intelligent. He's going to be put away in jail for the rest of his life - that'd be my guess."

Dewald faces multiple charges in both incidents, including kidnapping, criminal attempt kidnapping, burglary, false imprisonment, unlawful restraint, criminal trespass and indecent assault. He remains held in the Franklin County Jail.

The Associated Press contributed to this report.