Chief Justice John Roberts' judicial sleight of hand, transforming Obamacare's mandate into a tax, was a fittingly twisted save for a law of such grisly provenance.

Born of tawdry liaisons between industry lobbyists and political hacks, passed through naked logrolling and legislative skullduggery, Obamacare wasn't finalized until Thursday, when the chief justice, in effect, amended the bill so that it would become constitutional.

Here's how the sausage was made:

Candidate Obama, while receiving record sums from the drug industry, promised to hold his health care bill negotiations on C-SPAN. Obama even ran an ad attacking top drug industry lobbyist Billy Tauzin, and promising to "end the game-playing."

But within weeks of his inauguration, Obama started playing the game. An early Obamacare confab was held at the headquarters of the Democratic Senatorial Campaign Committee -- showing how this was a political exercise as much as a policy one.

At this April 2009 meeting, top lobbyists from the drug industry and White House Deputy Chief of Staff Jim Messina hammered out a deal -- exposed by recently released emails -- whereby the drug industry would pay for pro-Obamacare ads basically written by the White House. Big Pharma would also spend big to re-elect Democrats who voted for the bill.

Then over the summer, in closed-door meetings, drug lobbyists and White House officials crafted the legislation. Obama abandoned his campaign promises and pledged to protect the drug industry's government-granted privileges. The industry also secured subsidies and lengthy government-protected monopolies on biotech drugs.

The Senate bill was authored mostly by Finance Committee Chairman Max Baucus and Majority Leader Harry Reid, probably the two senators most notoriously cozy with lobbyists. To win over wavering Democrats, Reid loaded the bill up with special favors.

After both chambers passed their bills, disaster struck the Democrats. Despite huge fundraising from drug and insurance industry lobbyists, Democrats lost the special election to fill the vacant seat of the late Sen. Ted Kennedy. Lacking 60 Senate votes, Democrats resorted to novel legislative maneuvering, including the arcane "deem and pass" in the House and budget reconciliation in the Senate.

The final package was being rushed through unread, but House Speaker Nancy Pelosi explained, "We have to pass the bill so that you can find out what is in it."

Well, we found out, and it wasn't pretty. One celebrated provision was government insurance for long-term care, which was supposed to actually offset some of the bill's costs to taxpayers. Government accountants quickly figured out it was a complete disaster. Congress was forced to scrap it to avoid a death spiral of costs.

Another Obamacare revenue raiser got the ax soon after passage: the infamous 1099 provision. That would have imposed a huge burden on small businesses by forcing them to issue tax forms to vendors for all sorts of minor transactions.

The Louisiana Purchase provision was so complex -- in order to give special treatment to Louisiana without including the word "Louisiana" -- that it ended up with a typo. Instead of directing an extra $200 million to the state, it gave the state an extra $4 billion in Medicaid money.

Avik Roy, a conservative health care writer, wrote in February that government-run high-risk insurance pools are costing twice as much per person as the bill's authors predicted. This happened with the subsidies for private insurance, too: The White House this year increased the cost estimates by $111 million.

None of these "surprises" is really unexpected. Former top Senate health staffer David Bowen said in June 2010 that Obamacare was like Romneycare in that it would "do coverage first, knowing that that would bring on a cost battle second." In other words, it's a cost time bomb.

Other Democratic staffers who wrote the bill cashed out to K Street nearly immediately, becoming health industry lobbyists. Democratic Reps. Bart Stupak and Earl Pomeroy, who both lost their seats (Stupak retired, Pomeroy was defeated) thanks to their votes for Obamacare, were also rewarded with lobbying gigs for health care companies.

All of this Obamacare bait-and-switch legislative trickery came to a crescendo last week, when the Supreme Court, by a 5-4 vote, effectively passed the Roberts Amendment to HR 3590. Transubstantiation is usually reserved for priests, but Roberts transformed the unconstitutional individual mandate -- complete with its "shalls" and its "penalties" -- into a constitutionally valid tax.

If this is how a bill becomes a law, our kids are going to need new civics textbooks.

Timothy P.Carney,The Examiner'ssenior political columnist, can be contacted at tcarney@washingtonexaminer.com. His column appears Monday and Thursday, and his stories and blog posts appear onwashingtonexaminer.com.