Chief Justice John Roberts just became liberals' new best friend. The conservative justice — who in the past has led the charge to allow unlimited corporate spending in elections, strike down city gun laws, and dismantle affirmative action programs — came up big for President Obama on Thursday by providing the crucial fifth vote to largely uphold Obama's 2010 overhaul of the health care system. Most critically, Roberts sided with the court's four liberal justices to uphold the individual mandate, the centerpiece of ObamaCare that requires most Americans to buy insurance or pay a fine. The move stunned court observers, many of whom had predicted that Justice Anthony Kennedy, a more-regular swing vote, would be the conservative who wavered. (Instead, Kennedy voted to overturn the entire law.) Here, five theories why Roberts sided with the Left:

1. He wanted to preserve the court's reputation
The Supreme Court's image as an impartial arbiter of the law has been tarnished in recent years, and the public has increasingly come to view the court as a hyper-partisan institution. If the court's five conservatives had struck down the law, it would have left the impression that they had concocted a "jury-rigged ruling in order to win a huge battle that its party had lost in Congress," says Jonathan Chait at New York. "Roberts peered into the abyss of a world in which he and his colleagues are little more than senators with lifetime appointments, and he recoiled." 

2. He was abiding by his own pledge of restraint
When he was first nominated to the court by George W. Bush in 2005, Roberts pledged to "respect the co-equal branches of government, push for consensus, and reach narrow rulings designed to build broad coalitions," says Adam Winkler at The Huffington Post. His decision on ObamaCare is consistent with those promises of "modesty and humility," and this "marks the maturation" of a justice who too often has shown little regard for precedent.

3. He found a narrow, conservative way to rule
Roberts came up with a "rather nuanced analysis of the government's power" that allowed him to issue a conservative ruling in favor of ObamaCare, says Matt Negrin at ABC News. Roberts rejected the Obama administration's claim that the individual mandate is constitutional under the Commerce Clause, which gives Congress the power to regulate interstate commerce. Instead, Roberts interpreted the mandate as a "tax rather than a command," and merely affirmed that Congress has the right to levy taxes, a modest ruling that hardly expands federal power.

4. He wanted to reshape his legacy
"To those on the Left who viewed him as an ideologue," says Ethan Bronner at The New York Times, Roberts' decision will demand a "re-examination of his style and legacy." The ruling will bolster Roberts' image as a jurist who "sought to balance his own conservatism with his desire to build faith in the law and the nation's legal institutions," and mark a significant step in his evolution as the high court's leader.

5. He hoped to gut Congress' power
While upholding ObamaCare is a huge victory for liberals, the decision is arguably severely conservative. By rejecting the administration's Commerce Clause argument, Roberts has effectively said that Congress "cannot really regulate interstate commerce," says Chait. Indeed, this is "a substantial rollback of Congress' regulatory powers, and the chief justice knows it," says Tom Scocca at Slate. "Obama wins on policy, this time," but Roberts has rewritten "Congress' power to regulate, opening the door for countless future challenges." 

Read more political coverage at The Week's 2012 Election Center.