The Florida Senate narrowly defeated a bill this week that would have handed over management of more than two dozen state prisons to private corporations -- the largest-ever attempt at prison privatization in the nation.

The contentious measure was defeated despite getting the endorsement of powerful state Republican lawmakers, including Gov. Rick Scott and a former chairman of the Florida Republican Party. The Wall Street corporations that own and operate for-profit prisons were closely attuned to the vote in Florida, hoping for a major expansion of management contracts in the nation's third-largest prison system.

The policy implications were massive: the bill would have privatized every state prison south of Orlando, which represents about 20 percent of the entire correctional system. The GEO Group, one of the nation's largest private-prison corporations, has its corporate headquarters in the heart of South Florida and had expressed great interest in what its chief executive called "the largest single contract procurement in the history of our industry."

Both GEO Group and Corrections Corporation of America, the nation's largest operator of for-profit prisons, have lobbied heavily and spent liberally on Florida campaigns in recent years. Over the last decade, the Florida Republican party has been the single largest recipient of campaign donations nationwide from both companies, according to a Huffington Post analysis of campaign finance data, and employees at both companies or their proxies have donated a combined total of more than $1.8 million to Florida candidates and committees over the last three election cycles.

The legislation moved swiftly through Senate committees last month, with supporters arguing that outsourcing prisons could save the state up to $30 million each year. But the bill stalled on the floor two weeks ago as several Republican senators broke with their party over the issue.

"This is an opportunity to save money," Scott said before the vote, according to Bloomberg. "We know there are a lot of other things we need money for, whether it's education for our children, whether that's health care, whether it's other safety nets."

Critics in the Senate were upset that the state had not commissioned a study to analyze the projected cost savings. Instead, supporters had been relying on previous analyses by the state's legislative research arm -- reports that noted "the cost savings estimates are subject to caveats and should be evaluated cautiously."

Without definitive proof of the savings, critics of the plan didn't believe it was worthwhile to disrupt the jobs of thousands of state corrections officers. Others had philosophical objections to outsourcing such a vast part of the state's criminal justice system.

"I'm scared about the whole idea of private companies being responsible for taking away someone's freedom, for keeping them there," said state senator Steve Oelrich, a Republican who opposed the plan, speaking during debate this week. "No sooner should we privatize our military than we should be privatizing our corrections department and our correctional officers. I think it's bad policy."

The bill was defeated in a razor-thin 21-19 vote Tuesday evening, with nine of the state's 28 Republican senators voting "no."

Senate President Mike Haridopolos, a major supporter of the bill, stripped one of the most vocal Republican critics of the privatization plan, state Sen. Mike Fasano, of his chairmanship of a committee that oversees prison budgets.

The vote this week marks the second defeat for prison privatization in Florida in less than a year. Last spring, legislators tried to push a similar plan by including prison privatization in a massive annual budget bill in order to avoid an up-or-down vote on the measure.

A state judge ruled in September that the budget maneuver was unconstitutional, which invalidated the prison privatization plan.

A spokesman for the GEO Group, Pablo Paez, wrote in an email, "We continue to believe that there will be future opportunities in Florida and other states as well as internationally for public-private partnerships to deliver savings for taxpayers and improve the services provided to offender populations."