Here, bags of "yaba" tablets, or methamphetamine mixed with caffeine, are displayed for the media in front of the Narcotics Suppression Division in Bangkok on Feb. 1, 2017. Lillian Suwanrumpha/AFP/Getty Images

A four-year-old child who authorities believe was confined inside a closet at his home in Houston, Texas, tested positive for methamphetamine exposure, stated the attorney representing the boy.

According to a report by New York Post, the attorney also said the child told investigators that rats and roaches were “his friends.”

A judge in Harris County, Tuesday, allowed child welfare services to keep the child in their temporary custody during investigation. The investigators were not sure how long was the child staying at the residence. Police deputies came to the residence on Dec. 20 with a search warrant as they thought methamphetamine was being made and sold at the place, the report said.

On the same day, deputies with the Harris County Precinct 5 Constable’s Office found the child in dire living conditions and rescued him from the closet inside the house, ABC News affiliate KTRK-TV reported.

The attorney of the child, Rachel Leal-Hudson stated, “The detail on this case is very awful.”

She added, “This is a 4-year-old child who has seen things an adult should not have seen.”

The boy told the investigators that he was locked in a closet. Court testimony said that the boy was “not allowed out of it for hours at a time.” The child also told investigators that “his friends” were the “rats and roaches” that would visit him.

Leal-Hudson said, “He can articulate some things that are really shocking and surprising that tell us he was in there for a quite a length of time.”

The child also told the Harris County investigators that he was coerced to sit on top of the refrigerator as a punishment for sneaking out the closet. He stated that he was scared that he would nod off and fall.

The report further stated that the child’s mother was not present in the home during the raid. She was arrested when she came back home and was charged with endangering a child.

The mother, April Burrier, stated that someone else was supposed to take care of her son. According to investigators, Burrier was too intoxicated to give information about the person who was supposed to take care of the child and also their whereabouts.

The child was placed in foster care, temporarily. The child’s father, Robert Dehart, came to the court, Tuesday in order to get custody of the boy. Dehart stated that he left the child with the mother after Thanksgiving. He also claimed he had no idea the child would go through such a situation.

Dehart reportedly said, “I just want to get him back. I just want to get him back home.”

The KTRK-TV report stated that Dehart had a history with drug convictions. According to authorities, he didn’t submit a drug test till Tuesday. The case will be back in court in February after authorities perform a drug test on the father. Meanwhile, the search is still on for Daniel Clark Morris III, who was the person who allegedly made and sold methamphetamine from the house where the child was rescued from.