WHEN Franklin Roosevelt tried to pack the Supreme Court with liberal justices in an attempt to save his legacy, something extraordinary happened. A conservative justice by the name of Roberts swung to the left on a key decision, thereby preserving a crucial element of the New Deal.

Owen Roberts' vote was called the "switch in time that saved nine," the "nine" being the justices already firmly ensconced on the bench. FDR's unconstitutional plan failed. History has forgiven him this trespass, and so it could legitimately be said that Roberts, a Pennsylvania native, saved the president's hide.

Eighty years later, another conservative justice named Roberts sashayed to the left and possibly saved another president's nether regions. This week, Chief Justice John Roberts showed himself to be what he promised during those confirmation hearings years ago: a brilliant and independent thinker.

On Monday, he joined in Justice Anthony Kennedy's majority opinion that held the Arizona immigration law to be, in at least 75 percent of its provisions, unconstitutional.

Unlike Justice Antonin Scalia, who thinks that states have a sovereign right to keep intruders from invading their borders, Roberts and the rest of the majority understood that only the federal government gets to determine who stays and who goes away. The majority did uphold the "where are your papers?" provision that allows the police to inquire about the immigration status of someone stopped for another lawful reason. But police always had the right to do that, because questioning someone about his identity is a normal part of an arrest. Roberts used good sense and applied the law to the facts without letting political considerations or affiliation get in the way of his thinking.

And then, he did it again, only this time his vote was particularly momentous because it meant the difference between Obamacare and Obama-can't.

When he joined the majority in upholding the individual mandate, John Roberts created the majority that saved the administration's health-care plan. Sidestepping the commerce-clause issue (and whether we can force people to eat broccoli), the majority simply found that penalizing people for refusing to get health insurance was a tax, and that because the government already had broad taxation powers, the mandate itself was not unconstitutional.

In a way, they weren't saying that the mandate was constitutional. They were saying that the penalty for not complying with it was constitutional.

I think that the court is wrong, and that this is not the end of the Obamacare battle. But, in the meantime, the president is sitting pretty in the Oval Office, having won two significant victories this week with the help of John Roberts.

Which brings me to an important point: Obama has shown a fairly pronounced lack of respect for this court over the last few years, starting with his ambush at the State of the Union criticizing the justices for the Citizens United decision (which is still good law despite the hyperventilation of Democrats). He also has sent his proxies out onto cable and Sunday-morning news shows and has them writing op-eds attacking the justices as if they were a monolith, not realizing that when he attacks the group as a whole he also is insulting the Constitution, which quite clearly speaks about separation of powers. Obama, like FDR before him, seems to have this fixation that if the court doesn't see things his way, it's wrong. I know it's pretty heady stuff to be voted president of the Harvard Law Review, but he should leave the judging to the judges.

I have much more respect for John Roberts than I do for Barack Obama. Roberts has attempted to work with the diverse factions on his court, something he promised when he was nominated to be "first among equals" and something that he has demonstrated in glorious Technicolor this week. Obama, not so much.

Of course, conservatives will be spitting nails about his performance, and I happen to think they're right to question his judgment on the health-care opinion. The commerce clause should have been the focus of the opinion, not whether you can penalize someone and call it a "tax."

Nonetheless, this Roberts has proved that the court is an independent body that can't be reined in or intimidated into doing what the flavor of the month in the White House wants. Sometimes, when you let the court do its job, it might surprise you. Just like justices named Roberts. n

Christine Flowers is a lawyer. Send email to cflowers1961@gmail.com and read her blog at philly.com/FlowersShow.