The U.S. prison population has been falling for several years, reaching its lowest imprisonment rate since 1997, amid a sharp decline in violent crime. But that isn't ending the good times for the private-prison industry.

That might seem counter-intuitive, but analysts point to President Donald Trump's initiatives as providing an unexpected boon for these businesses. Although Mr. Trump's 2019 budget would maintain the federal Bureau of Prison's annual spending at $7.1 billion, some analysts expect spending to shift to private prison companies. At the same time, the budget calls for $2.5 billion to hold as many as 47,000 illegal immigrants within detention centers, another major revenue source for prison operators.

It's a remarkable turnaround for an industry that less than two years ago was on track to be phased out from use by the federal government, which at the time cited declining prison populations and reforms for its decision. A month after President Trump was inaugurated, the Justice Department backtracked and said it would continue to use private prisons.

Get Breaking News Delivered to Your Inbox

Since President Trump initiated a crackdown on illegal immigrants, the surge in arrests by the Immigration and Customs Enforcement (ICE) has also proved to be a boon for private-prison giants CoreCivic (CXW) and The Geo Group (GEO), according to Stefanie Miller of Height Securities.

Through the first nine months of 2017, ICE arrests shot up 42 percent from a year ago, Miller noted in a recent research report. "The Trump administration's tough-on-immigration policies are unlikely to fade anytime soon, meaning investors should expect continued strict enforcement, more arrests by ICE and the need to accommodate a growing number of arrested individuals," she predicted.

The result will be a "tailwind" for private prison operators, the analyst added.

CoreCivic, known until 2016 as the Corrections Corporation of America, is increasingly reliant on ICE, with revenue from the agency more than doubling between 2014 and 2015, according to Height. During the same period, the amount of revenue the company derived from the Bureau of Prisons slipped from 13 percent to 9 percent.

On the national level, CoreCivic CEO Damon T. Hininger has said the Trump administration's focus on cutting prison costs could benefit the industry.

"You're hearing this conversation of shrinking the kind of national footprint within federal government," Hininger said in a recent investor conference call. "And so I think this discussion about what's the most cost-effective solution for government, either public sector doing it or private sector doing it or a combination of both, so I think this conversation ... is beneficial for us."

Some states are turning to private prisons to lower their costs, such as Kansas, ground zero for an experiment in tax cuts and government austerity. The state signed a deal with CoreCivic to build a new prison to hold more than 2,400 prisoners at a cost of $160 million. In return, CoreCivic receive a 20-year non-cancelable lease agreement, with Kansas paying the company about $15 million a year over the life of the contract.

"This is a significant milestone as it represents our industry's first correctional facility to be developed through a public-private partnership and leased and operated by a government agency," Hininger said. Kansas lawmakers who support the deal said it will help lower costs for taxpayers.

Yet the evidence that private prisons are less costly than government-run facilities is thin, according to a 2016 paper by the Hamilton Project, a liberal-leaning think tank. Because private prisons don't release many details about their costs, it can be difficult to compare the two types of facilities, the study noted.

"Private prisons do not currently offer a clear advantage over their public-sector counterparts in terms of cost or quality," the authors wrote. "The wide variation across prisons, differences between the public and private sector, and data limitations render a comprehensive, direct comparison of cost and quality across prison sectors infeasible."

Other critics point to the ethical issues surrounding a for-profit business involved with incarceration. The American Civil Liberties Union sees the industry as creating "serious gaps in accountability and transparency." In 2016, a report from the Office of the Inspector General concluded private prisons have more safety and security issues than government-run prisons, including rates of assault.

Despite those concerns, it's unlikely that demand for private prisons will abate -- at least not during President Trump's presidency, according to Height's Miller.