ABC13 Investigates has learned Harris County's Juvenile Probation Department recently transferred dozens of severely mentally ill juveniles from a psychiatric hospital to the downtown detention center. The move comes after the department canceled its contract with the Harris County Psychiatric Center on January 31.

The Probation Department's Executive Director Tom Brooks blames the move on a shrinking budget, telling ABC13's Ted Oberg, "The kid with mental health issues is not going to benefit from a juvenile justice system around other delinquent kids, but it's the world we live in."

Brooks explained his department had a $3 million budget gap. The contract for the mental health hospital cost $3.2 million a year to treat nearly two dozen severely mentally children (10-17 years old) who had been accused of crimes.

"The five next highest ticket items (in the HCJPD budget) would come up to $1.6 million and cover hundreds of kids," he said. "The logical choice was to cut HCPC, not because we don't need it, but because we just don't have the funding."

The Juvenile Probation Department handles all juveniles accused of crime in Harris County, both before and after -- the juvenile equivalent of a trial. They range in age from 10 to 17 years old. The vast majority of them are not kept in custody before the juvenile equivalent of a verdict. The decision today affects some of the hundreds that are.

The kids treated at the county-run psychiatric hospital were severely mentally ill. Their numbers have grown since the contract began in the mid-1990s. Brooks described the children sent there as adolescents who "may be hearing voices, smearing feces on their cell walls, or having outbursts, violent outbursts."

Once the contract was canceled, the group was moved to the seventh floor of the Harris County Juvenile Detention Center in downtown Houston. They are housed there with trained staff. Brooks says his team of mental health professionals will give the group the best care they can.

"They will still get seen, they will still be placed on medication," he said. "It will just not be the best location for that type of child."

Steven Halpert, the chief of the Juvenile Division at the Harris County Public Defender's Office, told ABC13 he is concerned about moving the children out of the hospital.

"When they are not getting the mental health services they need, we're making them very vulnerable. They knew they couldn't be there. So now to say they can be here (in the detention center) - it's just reallocating money from one place to another," he said.

Moving 21 mentally ill juveniles into the detention center will make it even harder to manage the already overcrowded Juvenile Detention Center.

The JDC is housed in what used to be Harris County's Criminal Courthouse at 1200 Congress. The renovated facility has 210 individual cells built for one child at a time. Regulators at the Texas Juvenile Justice Department allow Harris County to put 40 children on low-rise beds in the day rooms of the detention center.

Even that is not enough space.

The facility was over-crowded every month of 2016. On Thursday night, there were 280 children in the Detention Center. It is 30 kids over the state allowance, but there seems to be little sanctions. There is nothing the Harris County Juvenile Probation Department can do.

As Brooks reminded ABC13, they are not allowed to turn children away.

"It makes me angry, but yet it's flattering. Send them to juvenile justice, they'll take care of them. It's not that easy," he said.

Halpert, a public defender, said the conditions are not right for kids.

"It is a prison - it is not a detention center - that's a euphemism," he said.

Dana, a mother whose son is in juvenile custody, was stunned to learn her son was on the floor. We are not using her name to protect her son's confidentiality.

"Maybe I am asking someone to care as much about my child as I care," she said. "I expected him to be in a room so he could close the door, so the door could be closed or closed on him. So he could be safe. Maybe I am asking too much."

The overcrowding is driven by several factors, according to Brooks:

- A dramatic increase in the number of violent crimes allegedly committed by juveniles. Between a third and half of juvenile detainees are held for so-called crimes such as Aggravated Robbery, Aggravated Assault, Aggravated Sexual Assault and Murder; and

- An increase in the mental health needs of juvenile detainees. Half of all kids in custody have a mental health diagnosis. That number is up 15 percent since 2014. One in four is on psychiatric medication. Mental health treatment alone for juvenile detainees cost Harris County $13 million in 2016.

The increasing violence and mental health needs combine to make stays in custody longer as judges, prosecutors, defense lawyers, doctors, nurses, probation officers and families work through the case. The average length of stay has not meaningfully declined since 2008.

The solution is - in part - a new juvenile detention facility.

While there may not be money to fund hospital treatment, there is money to design and build a larger home for juvenile detention. Harris County recently started designing one. The $75 million facility is expected to be constructed on county-owned land off Chimney Rock.