The US Department of Justice will phase out for-profit prisons for federal inmates, it announced yesterday. But although the United States’ private prison industry took a hit with the news, it won’t disappear anytime soon.

Large prison companies run not only federal prisons, but also state prisons. Through contracts with the Immigration and Customs Enforcement agency, they also run detention facilities for undocumented immigrants. Nine out of ten of the country’s largest immigration detention centers are operated by private prison companies, most of them by industry giants Corrections Corporation of America (CCA) and the GEO Group.

Although the prison population is generally declining in the United States, the number of detained immigrants has been on the rise. Part of the reason is a 2009 Congressional decision to have a mandated daily bed quota for detention facilities: Every night, the US must make available more than 30,000 spots for immigrant detainees. In 2005, the country held 230,000 immigrants in detention facilities. By 2013, that had risen to 440,600.

This has been a boon to private prison companies, which by 2015 operated 62% of beds available for immigrant detention.

In 2014, when the Obama administration was dealing with an unprecedented influx of Central American families into the United States, it decided to forego the usual bidding process for new detention facilities. Instead, it granted CCA an unprecedented $1 billion contract, the details of which were revealed by The Washington Post earlier this week.

According to the deal, CCA gets paid no matter how many beds are actually occupied—in contrast to many private prison contracts, in which payouts depend on the share of beds being used. CCA’s center, located in Texas, houses women and children asylum seekers.

Advocates have decried conditions in such private-run immigration facilities for years. In some facilities, including CCA’s Texas center, detainees said they did not have access to adequate medical care. In another CCA-operated center, according to a 2007 lawsuit from the American Civil Liberties Union, children were deprived of fresh air, forced to wear prison uniforms, and kept in their cells for 12 hours a day.