DALLAS — Nearly four years after a federal judge first ruled that Texas violated foster children’s civil rights by placing them in a system where rape and over-medication were the norm, it’s high time for the state to stop dragging its feet and start making changes, that same federal judge ruled on Tuesday.

Failure to do so could cost the state up to $100,000 per day under a new ruling from U.S. District Judge Janis Graham Jack, who found the state in contempt of court for failing to comply with some of her earlier orders.

In a Dallas federal courtroom Tuesday morning, state officials scrambled to answer a volley of questions from a visibly exasperated and often sarcastic Jack. At times, the judge accused state officials of lying in their official testimony during an earlier phase of the lawsuit, threatened to throw a state official in jail for producing records for the court that were illegible, and reprimanded a state attorney for wasting time and failing to address her with respect.

“The judge came down hard on the state, for good reason,” said Paul Yetter, an attorney representing long-term foster children in the suit brought against state leaders — from Gov. Greg Abbott to the state’s executive leadership in charge of health and human services.

“Her orders need to be obeyed in the interest of these children,” he said.

Those orders, which were upheld by an appeals court earlier this year, include a requirement that every home or facility that houses foster kids in a setting with six or more children hire enough staff to supervise the children, awake, for 24 hours per day.

Another order required the state to change its electronic records system for foster kids to clearly display whether a child has been a victim or a perpetrator of sexual violence. The children’s caregivers are supposed to have seamless access to that information, Jack said, to adequately supervise children and ensure that they are not being further victimized.

Jack appointed two monitors to oversee that the state is following those rules. Jack was clear that, based on information provided by those monitors, Texas’ health and human services agencies were making inadequate progress.

“I can no longer find [the Texas Department of Family and Protective Services] to be credible in any way,” Jack said. “It’s shameful … You all cannot be relied upon for anything. Period.”

Among the accusations was that Lisa Black, a former executive of the child welfare agency, had lied in court years ago when she said the state required large facilities for certain foster kids to have 24-hour, awake supervision. Jack called on Kristene Blackstone, who succeeded Black as associate commissioner for Child Protective Services, to explain why no one at the agency ever disputed Black’s testimony.

Blackstone said she was not familiar with Black's earlier testimony. While there has been no across-the-board requirement for large facilities that care for foster children with serious mental health or behavioral problems to provide 24-hour awake supervision, she said, most of those facilities have had their own supervision arrangements that nonetheless met those standards.

Attorneys for the state argued that child welfare officials had worked hard to understand — and implement — a complicated series of orders from the courts. Much of Tuesday's testimony centered on the fact that Texas relies on private contractors to provide homes for foster children, with child welfare officials saying they had informed the operators of group homes and shelters about the new standards they must adhere to.

The state's health and human services agencies "sought clarification concerning the broad order at issue in this case and demonstrated that they are working expeditiously to comply with the court’s order," Marc Rylander, a spokesman for the attorney general's office, said in a statement after the hearing. "Our children deserve reasonable provisions that make that care more safe and accessible, and we are dedicated to working with all parties toward that goal.”

Jack was unconvinced.

“You have created a crisis,” she said. “You are trying to fix it and blame it on somebody else.”

A separate point of contention in the hearing were discussions that the court-appointed monitors, Deborah Fowler and Kevin Ryan, have had with state officials about the appropriate number of children that a Child Protective Services worker may have on his or her caseload.

The U.S. Fifth Circuit Court of Appeals struck down the possibility of a judge creating a cap on the size of a worker's caseload, instead instructing the state to study the issue and come up with guidelines for child welfare workers. The state named John Fluke of the University of Colorado at Denver for that task, but the court-appointed monitors took issue with the choice.

In at least one other child welfare lawsuit, Fluke has testified that workers' caseload sizes have "no scientific relationship" with children's outcomes. Jack expressed disbelief that the state would nominate someone with such a track record. Still, given that the state had moved forward with a proposal for the caseload study, she opted not to hold the state in contempt of court on that issue.

Jack gave the state a Friday deadline to notify children's caregivers if the children were sexual violence victims or aggressors. Child welfare officials testified that they are working to amend their electronic records system to make that information more easily accessible but that it would take until mid-December for the state to make the technology changes.

If the state fails to guarantee that foster children living in group settings have 24-hour, awake supervision by Friday, the state will face fines of $50,000 per day, the judge ruled. Later this month, that fine will double to $100,000 if the state has not verified with the state's monitors that the fixes have been made.

Lawyers from the Texas Attorney General's office, which represents the state officials named in the lawsuit, argued Tuesday that the $15 million in fees charged to the state by some of the children's attorneys were excessive. Jack said she would limit some of the attorneys' fees, such as those charged at high rates for work done by interns or paralegals. But she signaled that she was not generally sympathetic to the state's arguments.

"Many of you did remarkable jobs, and I know the children are grateful," she told the children's lawyers.

Jack appeared disappointed with a remark from Blackstone that the last time the Child Protective Services chief had visited a large foster care facility was three or four months ago. Jack suggested that the court would need to rely more heavily on its monitors going forward.

But doing so is likely to provoke even more outcry from state officials over expenses; Fowler and Ryan charge Texas $425 per hour for their services, according to the Texas Department of Family and Protective Services.