“When my opponents and others were arguing that we should let Detroit go bankrupt,” President Obama said in Cleveland Thursday, “we made a bet on American workers and today our auto industry is back on top of the world.”

This is true. Obama’s opponents, including Mitt Romney, did argue that General Motors and Chrysler should go bankrupt. But what Obama consistently leaves out of the story is that he did, in fact, let GM and Chrysler go bankrupt.

He just did so in a way that violated every fundamental principle of America’s bankruptcy code, undermined the rule of law, and cost taxpayers an extra $26.5 billion.

Bankruptcy expert and George Mason University Law School professor Todd Zywicki and Heritage Foundation labor expert James Sherk exposed the truth this week in their new paper: “Auto Bailout or UAW Bailout? Taxpayer Losses Came from Subsidizing Union Compensation.

President Bush initiated the auto bailout in 2008 when he diverted parts of the Troubled Asset Relief Program (TARP) to GM and Chrysler to keep them running through the first several months of the Obama presidency.

In exchange for an eventual $80 billion total in bailout funds, the Obama administration forced both Chrysler and General Motors into bankruptcy. Both firms ceased to exist as they had for decades, and then “sold” all of their assets to new “General Motors” and “Chrysler” companies.

In a normal bankruptcy process, a bankruptcy court has a number of powers at its disposal to ensure that: 1)the emerging companies are financially competitive, 2) creditor interests are protected, and 3) all workers are treated fairly. Obama either abused or ignored all of these powers, always to the benefit of unions, and always to the detriment of taxpayers, non-union workers, and investors.

First, Section 1113 of the Bankruptcy Code empowers courts to rewrite labor contracts to make the surviving companies more competitive. Obama failed to exercise this power. Just ask Obama’s Car Czar Steve Rattner who recently admitted, “We should have asked the UAW to do a bit more. We did not ask any UAW member to take a cut in their pay.”

Second, a fundamental principle of bankruptcy law is the presumption that similarly situated creditors should receive similar treatment. Obama violated this in a number of ways, always to the benefit of unions, most famously paying off Chrysler’s unsecured union benefit trust fund instead of Chrysler’s secured creditors.

Finally, Obama protected some union pensioners while leaving similarly situated non-union workers vulnerable. Specifically, GM gave $1 billion to Delphi’s union retirees, but gave their non-union retirees nothing.

All told Obama’s violations of bankruptcy law made the bailout of GM and Chrysler $26.5 billion more expensive than it had to be. And according to Obama’s own Treasury Department, taxpayers stand to lose $23 billion if GM stock were sold today.

In other words, Obama turned what should have been a $3.5 billion taxpayer gain into a $23 billion loss. But that is just the immediate damage done to our nation’s bottom line. Obama’s undermining of our bankruptcy process and the rule of law is incalculable.

The free market has never been a free license to take whatever you want from whoever you can. It only works when there are rules of the road to ensure that competition is fair, open, and honest,” Obama said in Osawatomie, Kansas last year.

Obama is right: the free market only works when “the rules of the road” are honored. Unfortunately, Obama’s handling of the GM and Chrysler bankruptcy is a case study proving that he is incapable of ensuring that “competition is fair, open, and honest.”