NASHVILLE, Tenn. (AP) — After more than 16 years, the Tennessee Department of Children's Services is free of federal oversight from a 2001 settlement over its treatment of foster care children.

The long-awaiting decision by a federal judge Tuesday drew praise from both Gov. Bill Haslam and the nonprofit Children's Rights, which sued the department in 2000, about a decade before Haslam took office. Officials say the case has resulted in substantial changes to a substandard system that warranted a lawsuit.

Haslam's office said the state worked for years with a committee of nationally recognized child welfare experts serving as the federal court's monitor and made improvements in more than 140 requirements. Some included reasonable caseloads, sufficient training for case workers and quick response to abuse or neglect reports.

Haslam called Tuesday's court order a monumental step that should give the public confidence in the system. Additionally, the state has spent tens of millions of dollars on legal fees over those 17 years, and that money can now be devoted solely to kids, he said.

"We've moved lightyears away from where we were," Haslam said at a news conference Tuesday. "Most kids then were in an institutional setting, and that's what originally got, I think, the court's attention. We've now moved to really a family style, whether it be smaller group homes or hopefully actually with families, which is our preference. I don't think you'll see Tennessee go back."

According to Children's Rights, the department will remain under review by a state-funded accountability group for the next 18 months.

Ira Lustbader, the nonprofit's litigation director, said that at the time of the lawsuit, there was a "truly dangerous and broken system" in Tennessee. Workers were overloaded, the state had such little appropriate housing that children were long kept in emergency shelters, and basic services were woefully short, Lustbader said.

The original lawsuit centered on a 9-year-old boy who spent more than six months in overcrowded, dangerous Memphis emergency shelter.

"We've got to be honest: We didn't have a system here in 2000. I mean, we deserved to get a lawsuit," said Haslam Chief of Staff Jim Henry, who led the department from 2013 to 2015. "The fact is, we're a much better system now."

Lustbader said the experience shows that legal advocacy can change how children are treated by public programs.

"Tennessee's sustained compliance with court-ordered improvements demonstrates that real, systemic child welfare reform is achievable in America," Lustbader said.

There are approximately 7,300 children in Tennessee foster care. Difficulties persist in trying to care for them.

The Tennessean reported in May that kids were sleeping in department offices because there was nowhere else to house them. Department of Children's Services Commissioner Bonnie Hommrich said you can't predict everything that will go wrong, and it's particularly tough when kids are brought in in the middle of the night.

"We are committed to maintain this level of work going forward," Hommrich said at Tuesday's news conference. "But I don't want to kid anybody. It's hard."