In a 5-3 decision (Justice Elena Kagan had recused herself), the Supreme Court has struck down the form–but not the substance–of the controversial Arizona immigration law, SB 1070. The opinion by Justice Anthony Kennedy held that immigration law–including the decision not to enforce the law–is an exclusive area of federal jurisdiction. However, the Court also held–unanimously–that it is not unconstitutional to ask people to produce proof that they are legally in the United States, once they are stopped for another valid reason.

The result is that Arizona’s law survives–in a very narrow sense. The state can use its law enforcement officers to catch illegal immigrants–but not according to a state law designed to fill the gap in federal enforcement.

Politically, the decision is both a win and a loss for the Obama administration. It is a win because much of the Arizona law will not survive, while the grievance that animated Democrats’ opposition to the law–the process of asking people to produce proof that they are legally in the country–remains, and can be used again and again to motivate voters, particularly Latino voters, in the Obama campaign’s divide-and-conquer election strategy.

It is a loss for largely the same reason: the Obama administration’s extraordinary assault on Arizona–which included appeals to the United Nations–has failed to achieve the desired substantive result. It may mobilize some Latino voters, but it has riled up voters (Latino and otherwise) who believe the federal government lacks the will to enforce the rule of law. The Court, tactly, has left but one option for the millions of voters upset with the government’s immigration failures: namely, to vote the nation’s chief executive out of office.

The Court postponed announcing its eagerly-awaited decision on Obamacare until Thursday morning. Today’s ruling on the Arizona immigration law, which on balance is more of a win than a loss for Democrats, may provide the Court some political cover to overturn Obamacare. In another closely-watched decision, the Court today overturned a Montana campaign finance law that would have limited corporation and union political speech. The 5-4 majority was the same that held sway in the controversial Citizens United decision.