SAN ANTONIO -- Immigrant advocates are fighting to stop the largest South Texas detention center from getting its child-care permit.

On Wednesday, a judge issued a temporary restraining order in response to a lawsuit filed by Grassroots Leadership.

“Today, we are glad a judge has agreed to halt, at least temporarily, the appalling practice of labeling family prisons as childcare facilities," said Bob Libal, executive director of Grassroots Leadership. "Family detention camps are prisons. They are not childcare facilities."

The order prevents the Texas Department of Family and Protective Services from issuing a permit to the Dilley Detention Center. Immigration Customs Enforcement says currently, there are 1,368 people at the center that can house a total of 2,400 people.

The temporary restraining order comes on the heels of a permit approval for the Karnes Detention center. The Texas Department of Family and Protective Services gave them a six-month long child-care permit last week.

The order regarding the Dilley Center will last until next Friday when a judge will hear more from Grassroots Leadership.