A Texas judge has ruled officials from the state's Department of Family and Protective Services cannot license an immigration detention center as a childcare facility.

State District Judge Karin Crump's temporary injunction is seen as a huge victory for immigration rights activists, who labeled her decision a sincere effort to protect women and children now being held at 2,400 bed facility in nearby Dillery.

Judge Convinced Youths at Risk

In rendering her ruling, the judge pointed out that the facility's current license allows authorities to allow mixed gender detainees to room together and occasionally forces young children to room with adult strangers.

Just last month, a mother who escaped death and rape threats in her native El Salvador alleged her daughter was molested at the center by another female.

"The exceptions allow and have allowed for situations for children that are dangerous," the judge said. "And this temporary injunction addresses those concerns."

The case will proceed to a full trial in just three months, as the court is slated to hear arguments over whether the state agency can issue the licenses based on an emergency rule it adopted last year.

While Crump stresses she's convinced the agency doesn't have the authority to take such actions, opponents argue that the licensing requirements are watered-down versions of what other centers must abide by and make the detention centers less safe.

Grassroots Leadership Leading the Movement

The campaign to stop the licensing is being led by the nonprofit Grassroots Leadership, an immigrant rights group that has previously sued the family services agency.

As part of their case, Grassroots Leadership charges the state is only interested in moving forward with the licensing to comply with an order a federal judge issued last year.

Back in In July 2015, U.S. District Judge Dolly Gee ordered that immigrants held in Texas and elsewhere be released as soon as possible because their detention violates the provisions of a 1997 legal settlement stipulating that undocumented juveniles be held in the places that protect their overall health and safety.

At that time, Gee branded conditions in some of the detention centers as "deplorable." The case is now being appealed before the U.S. Ninth Circuit Court of Appeals.

"I think that what we heard over the last few weeks and what we've known is that the reason for the licenses was not about the protection of children but was about helping the federal government enforce this harsh immigration regime," said Bob Libal, executive director of Grassroots Leadership.

Crump's verdict was rendered after hours of expert testimony during which witnesses explained to the court the act of detaining children for long periods was detrimental to their health.

"They are under considerable fear and deprivation," said Luis Zayas, the dean of the University of Texas at Austin's School of Social Work. "They are dealing with constant stress and hyper vigilance about what's going to happen to them."