It was a moment of truth for John Roberts, a longtime pillar of the Washington legal establishment, a member of the ultra-posh Chevy Chase Club, and someone who acquaintances say cares deeply about how he is portrayed in the press.

By joining Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan and Sonia Sotomayor in upholding Obamacare on Thursday, Roberts stepped up to the challenge in a way that bitterly disappointed his conservative allies.

To his liberal detractors, the chief justice had seemed a lockstep vote in favor of conservative causes, more ideologue than arbiter. Had he led a Supreme Court majority in gutting President Obama’s health care law, Roberts’ standing as a jurist willing to thwart the will of Congress would have been carved in stone.

Instead, Roberts broke ranks with the likes of Antonin Scalia and Clarence Thomas on what is undoubtedly the most important ruling of his tenure so far—and the most politically explosive.

“This will define him,” Tom Goldstein, a Washington lawyer who has repeatedly argued before the court, said before the ruling. The founder of the influential SCOTUSblog, Goldstein had viewed Roberts’ legacy as “presiding over the most conservative court in American history.”

Roberts is a deft political operator who fervently wants to be seen as respecting court precedent, even as he has led the way on such game-changing decisions as Citizens United, which opened the floodgates to special-interest money in presidential campaigns.

“To strike down a law of this size is a huge thing in modern history,” says Dahlia Lithwick, a legal analyst for Slate. “Roberts staked his own success on limiting 5-4 bickering and on unanimity, as well as judicial modesty. This case implicates each of those values, almost regardless of the outcome.”

The ruling came amid growing public skepticism of the court as a brazenly political body, a partial legacy of the Bush v. Gore ruling that decided the 2000 election. Just 44 percent of those questioned in a CBS/New York Times poll this month approve of the high court, which drew favorability ratings as high as 80 percent in the mid-1990s.

Roberts, 57, worked Washington’s power corridors with a gentlemanly style as he built a glittering resume. The Harvard Law grad had clerked for William Rehnquist, whose death created the vacancy for him to take the court’s helm. He was a young lawyer in the counsel’s office at the Reagan White House. George H.W. Bush named him deputy solicitor general and, later, a federal appeals court judge. In between his government stints, he practiced in the blue-chip firm of Hogan & Hartson.

Tapped for the high court by George W. Bush in 2005, Roberts delivered one memorable line when he was nominated for chief justice two years later. As a judge, he told a Senate confirmation hearing, “My job is to call balls and strikes.”

But no one would seriously contend that Roberts has been a neutral umpire. He has been a champion of corporate rights and government power and a sharp critic of affirmative action. He has voted in the majority, usually in concert with such conservative stalwarts as Antonin Scalia and Clarence Thomas, more than 90 percent of the time. And through skillful management of his colleagues, especially swing justice Anthony Kennedy, Roberts has engineered a series of 5-4 rulings cheered by the right.

“He is to the left of Scalia and Thomas,” says Goldstein. “He is not the most conservative member of the Supreme Court. But he may be the most effective conservative member of the Supreme Court.”

Brad Berenson, a former Supreme Court clerk who worked in George W. Bush’s White House, calls the depiction of Roberts as a judicial activist “a little bit silly…It’s always been an easy soundbite for partisans who don’t like something the court does.”

In Berenson’s view, Roberts is “a lawyer’s lawyer, very much dedicated to his craft. He’s a sophisticated, polished, moderate-tempered individual. John Roberts is not a fiery radical.”

Even such left-leaning court-watchers as Lithwick give the chief justice his due. “He is an extraordinary politician,” she says, “brilliant and funny.” Roberts was “embarrassed,” Lithwick says, at some of the frivolity during the three days of oral arguments over Obamacare, which he tried to tamp down.

Roberts showed earlier this week that can surprise on occasion. He joined the liberal wing in Monday’s 5-3 decision striking down most of Arizona’s controversial immigration law, though not the key provision requiring police to check the immigration status while stopping someone on reasonable suspicion of a crime.

On Obamacare, it have been an extraordinary step for five justices to undo it, if only by killing the individual insurance mandate that lies at its heart. With Mitt Romney and congressional Republicans having spent two years crusading against the law, Roberts risked looking like a Bush appointee gutting the signature accomplishment of a Democratic president.

Instead, he proved himself capable of rising above ideology and following what he believed to be the law.

The constant carping that Roberts has been placing his thumb on the scale of justice “must bother him,” says Lithwick. “He thinks about his legacy, and I know he worries about the institution as Rehnquist did.”