*This story has been updated throughout.

The Texas Tribune -- A federal judge has ruled Texas will continue to need oversight of how it cares for vulnerable children, even after sweeping legislative changes last year.

In a 116-page opinion, U.S. District Judge Janis Jack ruled on Friday afternoon that Texas leaders will remain under the watchful eye of appointed special masters for three years as they implement more policies for how abused and neglected children are protected. She wrote in her ruling that “the system remains broken and [the Texas Department of Family and Protective Services] has demonstrated an unwillingness to take tangible steps to fix the broken system.”

“Because the State of Texas has failed to rectify long-standing problems with its foster-care system despite decades of awareness and extensive reports and recommendations by internal and external authorities, this Court concludes that unless directed otherwise by some authority, the studies and testing will continue, no remediation will occur and the dangerous condition[s] will continue to exist,” Jack wrote.

The news comes more than two years after Jack ruled in 2015 that the state’s foster care system violated children's civil rights. Texas Department of Family and Protective Services officials have been working with federal appointed special masters to evaluate how the state does with overseeing the child welfare system.

The ruling is a major blow to Republican Gov. Greg Abbott and legislators who rallied to come up with numerous child welfare bills during the 2017 Legislative session. Abbott, Republican Texas Attorney General Ken Paxton and state lawmakers have previously expressed dismay about federal interference — and were adamant that the state does not need oversight to overhaul the Department of Family and Protective Services.

Minutes after the ruling came out, Paxton promised to appeal it, calling it an "unfortunate decision."

"Unfunded and unrealistic mandates ordered by an unelected federal judge are misguided," he said in a statement.

The ruling ordered the state's Department of Family and Protective Services to make a top-down overhaul of the way it works with children and families, and then report on its progress to the federal court. Changes include giving caseworkers a limit of 14 to 17 caseloads; staggering the number of caseloads for new hires, and hiring more staff.

The department was told to see top-priority children within 24 hours of being taken by Child Protective Services; mark in children's records if the children have been sexually abused; write a policy on what constitutes child-on-child sexual abuse, and no longer have children sleep in CPS offices overnight. If any children do spend a night in an office, the agency will be required to log it for a monthly report to the special masters.

State leaders and legislators have faced continued criticism for how they've handled the agency's troubles. Headline after headline described a state child welfare system stretched thin, with children sleeping in state offices and, in some cases, dying on the state's watch.

In October 2016, Abbott, Republican Lt. Gov. Dan Patrick and House Speaker Joe Straus, R-San Antonio, have pressured both the department and legislators to make long-awaited changes to how the state helps children recover from abuse and find better living situations.

Legislators rallied with funding and bills. They gave the agency $150 million in emergency funds in December 2016 to offer higher salaries and hire more caseworkers. For the 2018-19 state budget, the Department of Family and Protective Services received $4 billion — up from $3.5 billion for the previous two-year cycle. That includes about $300 million to continue pay raises for caseworkers and another $88 million to more than 1,000 caseworkers over the next two years.

The department also has $95 million to boost payments to foster care families and other providers. The agency has touted that the extra funding has boosted morale among workers and helped them see more children in a timely manner.

Abbott expressed confidence when he signed a series of child welfare bills in May that Jack should "look at what Texas has accomplished" with the legislation and improvements the department had made.

But Jack and the special masters had looked at what Texas had accomplished and wrote in her ruling that officials' remedies "are indeed admirable." But, Jack wrote, "policies not practiced are of no value, and voluntary conduct of a defendant after the beginning of a suit cannot deprive a court of the power to order relief."

She also wrote that state officials have "taken minimal steps" to work with special masters to craft policies and were "limiting their participation to providing requested information."

Emma Platoff contributed to this report.

This article originally appeared in The Texas Tribune.

The Texas Tribune is a nonprofit, nonpartisan media organization that informs Texans — and engages with them — about public policy, politics, government and statewide issues.