One of the nation's largest detention centers for families caught crossing the southern U.S. border has received a temporary residential child-care license, amid discussions over whether the federal government will keep using such facilities.

The Texas Department of Family and Protective Services granted the six-month license last week to the 500-bed facility in Karnes City, southeast of San Antonio, agency spokesman Patrick Crimmins said Tuesday. The private prison firm that runs the facility for U.S. Immigration and Customs Enforcement, GEO Group Inc., had requested it after a federal judge said last year that kids couldn't stay in the centers because they weren't approved to care for children.

Immigrant advocates criticized the decision to grant the temporary license, citing reports of inadequate medical care and other issues as reasons why such facilities shouldn't get licenses. One group, Grassroots Leadership, said Tuesday that it and two mothers detained at Texas facilities with their children had sued in Austin to stop the licensing.

The license approval for the Karnes City facility comes as apprehensions of unaccompanied immigrant children along the southwest border increased by 78 percent for the period from Oct. 1 through March 31 compared to a year earlier, and the number of apprehensions of families more than doubled.

ICE has indicated in recent months that it's looking to change how it houses families and children caught along the U.S.-Mexico border, possibly making changes at the Karnes facility. But ICE would not address Tuesday when it might make any changes. Instead, ICE spokeswoman Jennifer Elzea called the licensing of Karnes "an important step" in improving oversight and transparency of family detention centers.

The Karnes City facility and a 2,400-bed facility in Dilley, also located south of San Antonio, opened in 2014 in response to the arrival of tens of thousands of mothers and children from Central America.

"Anyone who has been to either of these facilities understands that they are prison facilities," said Bob Libal, executive director of Austin-based Grassroots Leadership. "The real question is, does an agency have the right to license a prison as a child-care facility? We think that the answer is no. They would have to go to the Legislature to get that approval."

Among the changes ICE has telegraphed, the agency has sought potential service providers to run state-licensed residential care facilities for families and children held by the agency, ideally in Arizona, California, New Mexico and/or Texas. ICE asked for information for facilities that could accommodate up to 1,000 beds "which could be provided at a single location, but would ideally be comprised of several service locations with up to 500 beds at each facility."

Asked during a congressional hearing in March if her agency would stop using Karnes and Dilley for family detention in fiscal year 2017, ICE director Sarah Saldaña said it probably would convert Karnes into housing for adult males and possibly also children. She said the facility at Dilley "will continue to exist."

An inspection at the Karnes facility in March before the temporary license was granted found six deficiencies. Those included: on one occasion observing a child in a bedroom without his or her mother or a staff member present, and discovering that an employee was not qualified for their position.

The deficiencies were corrected before the temporary license was issued, Crimmins said. He said during the six-month term of the temporary license, at least three unannounced inspections of Karnes would take place. If any problems are found, they would need to be addressed before a permanent license could be issued.

A similar application for a child-care license for the Dilley facility, which is run by Corrections Corporation of America, is still pending, Crimmins said.

An inspection in April of that facility found 12 deficiencies. Those included: all playgrounds showing worn AstroTurf and exposed seams creating a potential tripping hazard, and unsecured medical supplies such as scalpels and used syringes seen on top of counters.

No temporary license for the Dilley facility will be issued until these problems are corrected, Crimmins said.