The Obama administration will make it easier for some immigrant mothers and their children held in U.S. federal detention centers to be released under a new policy aimed at giving families a chance to show that they cannot return to their home countries for fear of persecution. The new policy will allow the families to post bond to ensure that they appear for court appearances and was announced Wednesday in light of recent criticism over the centers’ living conditions, U.S. Secretary of Homeland Security Jeh Johnson said.

“I have reached the conclusion that we must make substantial changes in our detention practices with respect to families with children,” Johnson said in a statement. Families who entered the country illegally and have sought asylum in the U.S. would have the opportunity to make their case to the Department of Homeland Security. “In short, once a family has established eligibility for asylum or other relief under our laws, long-term detention is an inefficient use of our resources and should be discontinued,” said Johnson.

Johnson said the agency would interview the families “within a reasonable time frame” to speed up the release process. The agency also recognized the risk of flight and public safety but said the bond amounts would be set to reflect those concerns.

Lawmakers and activists have condemned the Obama administration’s detention program, underscoring the often unsafe and even abusive conditions the families endure in the detention centers. Tens of thousands of women and children have been held in the centers in Berks County, Pennsylvania; Dilley, Texas; and Karnes, Texas, since the summer of 2014.

The centers resulted from last year’s U.S.-Mexico border crisis in which a rush of immigrants tried to enter the U.S. illegally. Activists and lawmakers have pressured the government to close the centers in light of reports of families suffering depression, trauma and months of uncertainty.

Many of the families have sought asylum in the United States. The new policy would make it easier for those families to find a faster path to their release.

Some Republicans were swift to criticize the new policy, citing security concerns and what they see as the president’s soft stance on immigration. "This is insane," one GOP staffer told the Washington Examiner. "Does Jeh Johnson really think ISIS won't take notice?"