The US Supreme Court has upheld the constitutionality of President Barack Obama’s healthcare law, in a 5-4 decision, with the four liberal justices being joined by Chief Justice John Roberts. Both the result itself, and the composition of the majority, have surprised observers from all sides — so much so that CNN and Fox News initially misreported the result, claiming that the court had struck down the law.

The centrepiece of the massive Affordable Care Act — usually known as Obamacare — is the “individual mandate”, which obliges all uninsured US citizens to acquire health insurance, with the presupposition that the act would also set up healthcare “exchanges” that offered affordable insurance to low-income people.

The Obama administration has argued that such a mandate is similar to the obligation to buy car insurance, and that states such as Massachussetts — under a governor named Romney — had instituted an individual mandate at the state level. The Right argued that the compulsory nature of the mandate was a violation of the Constitution, because it exceeded the federal government’s “enumerated” (i.e. specified) powers.

The law thus allegedly reached into matters that should be managed by state governments — one way in which the Republicans got around the sticky fact that their presidential candidate had pioneered the scheme at that level. The Obama administration and the Democrats in Congress relied on two clauses in the Constitution — the Commerce clause and the Necessary and Proper clause — to claim the right to set the individual mandate at a national level.

The Commerce clause states that:

[The Congress shall have Power] To regulate Commerce with foreign Nations, and among the several States, and with the Indian tribes:

And the Necessary and Proper clause gives the federal government the power to make laws that enforce it:

The Congress shall have Power — To make all Laws which shall be necessary and proper for carrying into Execution the foregoing Powers, and all other Powers vested by this Constitution in the Government of the United States, or in any Department or Officer thereof. [foregoing powers in this case means, inter alia, the Commerce clause].

The Democrats’ argument was that health insurance was an interstate product, and that the federal government was therefore able to regulate it; the argument against was that compelling individuals to purchase a service was such a vast over-extension of the Commerce clause that it was essentially a blank cheque for federal intervention at the state level. Hence, the Right’s alarm about the passage of the ACA — they argue that it is a one-way ticket to an over-ride of the constitution, and hence the end of America. Sorry, the END OF AMERICA.

The ACA had no sooner been passed than state governments were mounting legal challenges to it. Initially, it was thought that these would have no chance. But Florida put forward a particularly well-researched challenge — inevitably rubber-stamped by the conservative circuit court it shares with several southern states — and opinion started to shift. By the time it reached the Supreme Court, most opinion was that the court would strike down the law.

What hope there was rested on Anthony Kennedy, who sometimes sides with the four liberal judges, and who might be unwilling to strike down a 2000-page law, and effectively govern the country from the bench. By the start of this week, Democrats and the Left had hunkered down for a loss, and were beginning to look to the political capital to be gained from it — running against the Supreme Court, mobilising the millions of people who have started to benefit from the law. This provoked sneering from the Right, on this hopeless pre-defeat spin.

They’re not sneering now. They’ve been stunned by the judgment, all the more so, because it did not, in the end, turn on an interpretation of the Commerce clause. Instead, Roberts and the four liberal judges upheld the imposition of a mandate (or a fine, if you failed to get insurance) as a tax, which the federal government has a right to levy. Robert’s precedent was a 1992 case in which the state of New York was charged a surcharge for failing to dispose of its own nuclear waste. The majority opinion simply argued that you call things whatever you like — surcharge, mandate, etc — but it can still be defined as a tax.

So how did Roberts switch behind this? Close reading of the document by some legal commentators suggests that the leading majority opinion was initially a striking down of the ACA as an unconstitutional extension of the Commerce clause — but that Roberts was then persuaded to join the minority opinion that it was a legitimate tax. The minority became the majority, and the Commerce clause — which had been the Obama administration’s main line of defence — became unimportant.

Was Roberts swayed by the pure politics of the decision? Did he strike a deal with the liberal justices and strike out another section of the act — which would have penalised states who did not take additional Medicaid funds (yes, folks, some Republicans hate their people so much that they would refuse extra money for medical programs for the very poor of their state, in order to avoid endorsing Obamacare)? Or was it simply scrupulous legal reasoning?

The theories will continue to swirl around. One point that has been made is that the decision neatly extracts the court from any political partisanship — on the one hand it awards a win to the Democrats, but not on the grounds they wanted. And on the other, team Obama is saddled with the court’s judgment that the mandate is a tax — something the Democrats have spent two years furiously denying.

Despite the best efforts of the increasingly irascible conservatives on the bench, it has pulled the court back from delegitimising itself as an impartial judicial office — a pity, in a way, because a thorough awareness that the court is a political agent (which should have been obvious after Bush v Gore 2000) would not have been a bad thing.The Right’s reaction to this judgment has been hilarious. Having spent months talking up the conservative and republican function of the court in restraining tyrannical govt, etc, they are now cursing out Roberts — a George W Bush appointee — as a betrayer. Check out National Review‘s thundering editorial for a deeply pleasurable mix of contumely, bitterness and sheer fantasy. “The court has failed to do its duty”, they say. What is their duty? To deliver the ultimate interpretation of the Constitution, in order to defend the Republic. What is an essential part of the Republic — the judiciary as a separate power of government. So the court has failed in its duty by doing its duty. Thus does the US Right reason.

How will this judgment play politically? Democrats were trying to put a brave face on potential defeat, but the striking down of the Obama administration’s centrepiece would have been utterly devastating to legitimacy and morale. For at least some Americans, the court’s decision will reassure them that the Obama administration is not some band of outlaws. Much of the Right’s argument about a soft coup by a Kenyan Muslim has had a lot of the steam taken out.

But that is not necessarily win-win for the Obama administration. Though there are many parts of the ACA that people like — banning insurers from excluding people with pre-existing conditions, for example — the individual mandate has been blamed for distorting the market, in the three years before it comes on stream (in 2013). Much of this has been pure guerilla warfare by the insurance companies — boosting employment-based scheme premiums through the roof, so that many companies simply drop insurance schemes from their conditions. This is then blamed on the individual mandate, with people told that they will have no option but to take the inferior insurance packages on offer when the health exchanges come in.

Obama had opposed the “individual mandate” option during the ’08 campaign, arguing for a universal public option (with private insurance still available). But he couldn’t get that through a House of Representatives, which had 30 or so “Blue Dog” Democrats — Democrats from Republican states, who cleave to a conservative line — and the mandate became a fallback. The criticism from the Left was that made things worse — embedding the insurance industry even deeper in American healthcare, the reason it delivers substandard care for twice the cost elsewhere (16% of GDP and counting).

But that ignores the political point — that the individual mandate is a Trojan horse whose purpose is to establish the principle of universality. The oft-quoted point is that it is unfundable — but that, of course, is the point. By the time its truly enormous bills come due, the benefits of the system will be clear — and the system can be transitioned to a semi-public and then public system. That’s the theory, anyway. Whether the Democrats will get a chance to go to stage two remains to be seen — the issue of jobs and economic recovery is overwhelming any other issue, which is bad news for Obama. Today’s decision is a win — a major one for Obama’s legacy — but tomorrow the billion-dollar Right win onslaught starts afresh.