U.S. Republican lawmakers grilled Homeland Security Secretary Jeh Johnson on immigration this week over President Barack Obama’s immigration executive actions in a prelude to escalating backlash following the president’s moves. But while Johnson defended the legality of deportation relief for millions of undocumented immigrants, he also brandished the other major part of the executive action: strengthened border security, enhanced by an expansion of immigration detention centers.

This month, the Department of Homeland Security is set to open the country’s largest-ever family detention facility in Dilley, Texas, targeted at families crossing the southern border illegally. The administration greatly expanded family detentions after the number of children and family units coming into the country, many of whom were fleeing violence in Guatemala, Honduras and El Salvador, spiked over the summer. In June alone, 16,329 family units were apprehended. But by August, that figure fell to 3,295 and has continued to drop off. Nevertheless, Johnson indicated plans to expand U.S. family detentions in the coming months in case those numbers rise again.

“I believe that added detention capability on the southern border, and some disagree with me, is essential to border security,” Johnson said during his testimony Tuesday.

Immigration detention has long rankled immigration advocates, who cite poor conditions, mistreatment of immigrants and denial of due process in many facilities. But family detention has been a particularly prickly subject, especially for those who remember swirling abuse allegations over the T. Don Hutto family detention center in Texas, which prompted authorities to shut it down in 2009 and largely halt the practice of family detention until this year.

For some, the revival of family detention symbolizes the disconnect between the Obama administration’s leniency toward undocumented immigrant families inside the U.S. and increased crackdown on families crossing the border illegally. “There’s a real discrepancy between this approach to look tough at the border for the folks who are coming in, but to be compassionate for the folks who are already here,” Mark Noferi, enforcement fellow at the American Immigration Council, said. “It seems like there’s an attempt to separate those two issues. But of course many of the folks who are coming here have families who are already here.”

Before this summer, Central American family units caught by Border Patrol agents would generally be released with a notice to appear in court. But Johnson began authorizing new detention facilities for these families in part to dissuade more people from arriving.

“If you come here illegally, and don’t have a legal basis to stay under our laws, we will send you back,” he said in July. When the migration numbers began to fall in August and September, Johnson credited detentions in part for contributing to the slowdown. But some analysts have said the shift is seasonal, and downplay detentions possible deterrence factor. “If someone’s fleeing for their life, it’d be very hard to deter them,” Noferi said.

Until June, only one small, 85-bed family detention facility was in operation in Leesport, Pennsylvania. Since then, the Department of Homeland Security has opened three additional facilities: the 700-bed center in Artesia, New Mexico, a 532-bed center in Karnes County, Texas, and finally, the 2,400-bed facility in Dilley, Texas.

The new detention centers were supposed to avoid going the same way as the Hutto center, which was plagued by complaints that its migrant detainees were treated like prisoners, complete with barbed wire lining the perimeter of the facility. But the new centers have also attracted controversy. The Artesia facility is  closing down after facing a barrage of criticism and a lawsuit over what civil rights groups said were deplorable conditions and mistreatment of traumatized women and children fleeing violence. The lawsuit, filed in part by the American Immigration Council, references restricted access to legal counsel and women pressured to detail experiences of abuse in front of their children. Advocates have also decried Artesia as a deportation mill that has deprived immigrant families of due process in seeking relief inside the United States. 

Johnson acknowledged Artesia’s problems in his testimony Tuesday, noting that all the immigrants there would be transferred to the Dilley center. “I want to make sure that the conditions of detention [in Dilley] are adequate and meet the appropriate standards,” he said.

Whether the agency delivers on that commitment won’t be clear until the Dilley center is fully operational. But some advocates say expanding family detentions is largely a political move to showcase the administration’s tough border stance, and not one borne of sound policy. "It's the default response to any sort of immigration crisis, rather than to address the dynamics that led to it," Donald Kerwin, executive director of the Center for Migration Studies in New York, saying that detention and interdiction programs were "part and parcel with a greater border enforcement focus." 

“Detention should be a last resort," he added. "There are ways to accomplish the purposes of detention, which is to assure [court] appearances, that are well short of actually detaining babies, young children and their mothers.” Kerwin referenced alternative-to-detention programs employed by the U.S. government, in which immigrants are released but check in periodically with a case manager until their assigned court date. Proponents of these programs say they have shown remarkable success in getting immigrants to appear for their court hearings, and cost far less than the estimated $164 a day per detainee required to keep detention facilities running.

Immigration and Customs Enforcement funds for the Dilley facility will mainly go to the Corrections Corporation of America, one of the nation’s largest for-profit prison corporations. CCA was also in charge of running the Hutto center shuttered in 2009, a fact that has alarmed advocates keeping a close watch on the Dilley developments. Artesia was run by ICE employees, and another large for-profit prison company, GEO Group, runs the Karnes County facility.

ICE is contracted to pay $920 million to CCA to run the center for the first year of operation. But in a peculiar twist, $438,000 of that fund will go to the town of Eloy, Arizona, which is 900 miles away from Dilley and will play no part in managing the center. An October NPR report laid out the strange dynamics of the contract, which allowed ICE officials to expedite the construction of the center through amending an existing agreement with Eloy that doesn’t require competitive bids.

But the future of the Dilley facility -- and Homeland Security’s enhanced border security plans in general -- will depend on how Congress votes on next year’s government budget. Republicans angered by Obama’s executive action have threatened to provide Homeland Security’s funding only through March 2015 -- an option that Johnson has called a “very bad idea,” warning that short-term funding would throw the Dilley development plans in jeopardy. The House of Representatives is expected to vote on the plan next week. 

Correction: A previous version of this report misstated a quote from Donald Kerwin. He characterized interdiction programs as part of the government's default response to immigration crises, not a solution.