While shares of Corrections Corp of America (NYSE: CXW) and GEO Group (NYSE: GEO) were beaten down following the Justice Deptartment's recent decision to limit the role private prison operators play in managing federal prison populations, the election of Republican Donald Trump as president has caused their stocks to soar.

Trump didn't campaign as a law-and-order candidate, per se, but the markets apparently view his election as an indication that a tougher stance will be taken in Washington, and that the DOJ's new position against using private prisons would be reversed.

In August, Justice issued a memo directing officials to either allow their contracts with private prison operators to expire when they come up for renewal, or "substantially reduce" their scope. The goal, in both instances, was for "ultimately ending ... [the] use of privately operated prisons."

While  the memo only covered 13 facilities housing 22,000 prisoners, the three private prison contractors in the U.S. -- Corrections Corp, GEO Group, and privately held Management & Training Corp. -- were all worried their revenues would be decimated by the edict because it could lead to other agencies similarly reviewing their contracts. GEO has already had a contract award reversed since the memo came out.

But the election has apparently changed that outlook, foremost undoubtedly, because the Department of Homeland Security's Immigration and Customs Enforcement houses a far larger percentage of U.S. inmates. More than 70% of ICE's detainees are housed in private prisons, but mostly through state and local governments, and Trump did pledge to crack down on illegal immigration. Rather than a reduction or elimination of the private prison system during a Trump administration, we are likely to see an expansion.

Shares of Correction Corp soared 43% Wednesday while GEO Group was more than 20% higher. While those moves didn't completely erase the declines the followed the release of the DOJ memo, when their shares were cut in half, they did regain a lot of their previous value.

Those companies still have to confront the problems outlined in an an inspector general's report that took private prisons to task for  being less safe and secure than government-run facilities. While the prison operators have said the report was flawed, and a report by Bloomberg noted it failed to take into account the types of prisoners being housed in private facilities and whether they had more strict rules, meaning such inmates might be more prone to violence and more contraband would likely be found, they need to further overcome the growing, visceral objection people have to private companies incarcerating people for profit.

However, as gloomy as the outlook for the private prison system was before, it appears to have brightened up considerably.

A secret billion-dollar stock opportunity
The world's biggest tech company forgot to show you something, but a few Wall Street analysts and the Fool didn't miss a beat: There's a small company that's powering their brand-new gadgets and the coming revolution in technology. And we think its stock price has nearly unlimited room to run for early in-the-know investors! To be one of them, just click here.

Rich Duprey has no position in any stocks mentioned.