A federal judge ruled Friday that women and children who were detained after crossing the U.S.-Mexico border should be released.

A Blow to Family Detention

U.S. District Judge Dolly Gee from California ordered for hundreds of children and their mothers to be released because their detention violates a court settlement issued 18 years ago, U.S. News reports according to the Associated Press.

Back in 1997, a settlement brought against federal officials barred all children from being held in unlicensed, secure facilities. The settlement covered all children in the custody of federal immigration officials regardless of whether they were with a parent or not.

The ruling upholds a decision Gee made in April, representing a victory for the immigrant rights lawyers who brought the case.

"They are holding children in unsafe facilities, it's that simple," said Peter Schey, executive director of the Center for Human Rights. "It's intolerable, it's inhumane, and it needs to end, and end sooner rather than later." Schey said federal officials "know they're in violation of the law."

Meanwhile, the Department of Justice argued that it was necessary to modify the settlement and use detention to try to deter more immigrants from crossing the border after last year's surge. They also said it was an important way to keep families together while reviewing their immigration cases. The Judge rejected their argument on Friday.

Will It Stick?

Though Judge Gee's decision strikes a blow at current detention policies, it remains unclear how her ruling will play out. Some undocumented immigrants have cases on wait predicted to run up until 2019, and lawyers on the winning side of the case Friday said they weren't expecting anything like a mass release of detained families come Monday.

Gee's ruling gives the Department of Justice an opportunity to respond to the ruling by August 3, according to the LA Times, which includes the option to appeal the decision. The Justice Department said it plans to file a response. 

Issues surrounding family detention begun gaining public attention after hundreds of thousands of immigrants swarmed the United States from Latin America in large waves starting in 2014. Many immigrants said they were fleeing their countries because of gang and domestic violence back at home. Facilities have held thousands of undocumented immigrant women and their children as a result.