A child welfare agency in Pennsylvania failed to protect children from horrific abuse and neglect, allowing them to languish for years in homes overtaken by animal waste and garbage, a prosecutor said Tuesday as he announced criminal charges against five caseworkers.

Three caseworkers and two supervisors at Lackawanna County’s Office of Youth and Family Services in Scranton were arrested on felony charges of child endangerment and failing to report abuse, days after state authorities downgraded the county agency’s license.

The caseworkers knew that children were living in dangerous, deplorable conditions, but "instead of coming to the rescue, they chose to walk away," said District Attorney Mark Powell. In some cases, he said, the workers "falsified reports to make it seem like everything was OK when they knew it wasn’t."

A Lackawanna County spokesperson declined to comment on the allegations — which involve eight children in three households — or whether any reforms were planned at the child welfare agency.

FLORIDA COUPLE ARRESTED IN ‘BONE CHILLING’ CHILD ABUSE CASE, SPECIAL NEEDS 3-YEAR-OLD 'ROTTING IN BED': POLICE

In one case, police went to a house for a report of loose dogs and found what court documents described as a house of horrors: Broken windows, piles of junk, swarms of mites or fleas, walls and floors covered in animal feces and urine, and an "overwhelming smell of feces, rotten garbage, fly activity, and decay" that required an officer to use a respirator.

The children in the home, ages 9 and 10, were underfed, covered in flea bites and slept on the floor without a pillow or blankets. The younger child was not toilet trained, according to court documents.

The mother said she knew she was failing to provide a safe home for her children — and told police she'd repeatedly and fruitlessly begged the Office of Youth and Family Services for help, according to a police affidavit.

Philadelphia, Lancaster, Pittsburgh crime

Five child welfare agency employees in Lackawanna County, Pennsylvania, were arrested after failing to protect children from horrible abuse and neglect. (FOX News)

She was "desperately seeking help, tools, treatment, and services, which never came," police said.

Last week, following an annual inspection, the Pennsylvania Department of Human Services downgraded the county’s license to provisional status and ordered it to submit a plan of correction.

In response to the state inspection, the Office of Youth and Family Services tried to shift blame to Scranton police, whom the agency accused of running a "questionably motivated criminal investigation" into its practices.

TEXAS MAN SENTENCED TO 45 YEARS IN PRISON FOR CONTINUOUS SEXUAL ABUSE OF CHILD

"Bad actors in the police department are routinely using threats and intimidation" to investigate the child welfare agency, county officials said in their formal response. "The investigation’s primary outcome appears to be the denigration and defamation of both individuals in the agency as well as the entire mission, vision, and practice of the agency."

A message was left with Scranton Police Chief Thomas Carroll seeking a response to the agency's claims.

The county agency also blamed staff shortages for some of the problems, saying it was trying to increase its ranks and take other steps to address the shortcomings identified in the state inspection.

Powell, the district attorney, said a lack of staff had nothing to do with the criminal behavior of some of the agency's employees.

"The children in these cases didn’t fall through the cracks because OYFS was understaffed. These cases were on the agency’s radar for a long time," said Powell, adding that referrals had come from neighbors, landlords, teachers, code inspectors, medical professionals and others.

CLICK HERE TO GET THE FOX NEWS APP

He said the abuse and neglect that children suffered because of the agency's indifference was "heartbreaking and unacceptable."

The defendants were identified as Randy Ramik, 59, of Clarks Green; Bryan Walker, 51, of Eynon; Erik Krauser, 45, of Dickson City; Sadie O'Day, 34, of Scranton; and Amy Helcoski, 50, of Scranton. Each defendant was freed on $20,000 unsecured bail with an order to return to court next month.

Court documents did not list attorneys for any of the defendants. A woman who answered the phone at a number for Ramik hung up on a reporter. The other defendants could not be reached.