(CNN) Adapted from "The Chief: The Life and Turbulent Times of Chief Justice John Roberts" by Joan Biskupic. Copyright © 2019. Available from Basic Books.
Chief Justice John Roberts arrived at the Valletta campus of the University of Malta on July 3, 2012, to teach a class on Supreme Court history. As he emerged from the back seat of a black sedan, he held his brown leather briefcase in front of him, almost as a shield. He wore a blue blazer, striped button-down shirt, and tan khakis. His clothes looked crisp, though his face was haggard. He was as exhausted and distressed as he had been in years.
Roberts had left behind a storm in Washington over his opinion upholding President Barack Obama's health-care overhaul -- the Affordable Care Act -- a stunning validation of Obama's signature domestic achievement that transformed public perceptions of the chief justice.
Republicans in Congress had been fighting the law dubbed Obamacare at every turn for two years, and all the GOP presidential candidates in 2012 had vowed to repeal it. And now Roberts, a nominee of President George W. Bush, had saved it.
Going forward, the chief justice would be viewed with skepticism by conservatives, despite also having taken the lead on limiting racial remedies and voting rights, helping roll back campaign finance regulations and voting for stronger Second Amendment gun rights.
Roberts' moves behind the scenes were as extraordinary as his ruling. He changed course multiple times. He was part of the majority of justices who initially voted in a private conference to strike down the individual insurance mandate -- the heart of the law -- but he also voted to uphold an expansion of Medicaid for people near the poverty line.
Two months later, Roberts had shifted on both.
The final tallies, 5-4 to uphold the individual mandate and 7-2 to curtail the Medicaid plan, came after weeks of negotiations and trade-offs among the justices.
The ACA, signed by Obama in 2010, followed decades of failed attempts in Washington to control spiraling medical costs and provide Americans with higher-quality health care. It created a marketplace where the uninsured could buy coverage and protected people from being unable to get health insurance because of pre-existing conditions such as diabetes, cancer and other chronic illnesses. To support the system and draw in the healthy as well as the sick, the law required that most uninsured people obtain coverage (the "individual mandate") or pay a penalty, to be collected as part of an individual's annual taxes -- a provision critical to the final ruling.
The law also expanded Medicaid benefits to a wider range of needy individuals. The money for about 90% of that expansion would come from the federal government. But it would come with a strict condition: If states did not broaden their programs as dictated they would lose all Medicaid funds.
RELATED: Why Trump can't count on the Supreme Court to kill Obamacare
After an unusual three full days of oral arguments in late March 2012 (a typical case gets one hour on one day), the nine justices gathered in a private conference room off the chief's chambers to cast initial votes. They were alone, with no law clerks or administrative staff.
The discussion focused on the individual insurance mandate and Congress' power to regulate commerce. Roberts went first, as was the custom, laying out his views. He emphasized that he believed the Constitution's commerce clause never was intended to cover inactivity, such as the refusal to buy insurance.
After the chief, conservative Justices Antonin Scalia, Anthony Kennedy and Clarence Thomas offered their views. Like Roberts, they thought Congress' commerce authority did not cover an individual's decision to forgo -- rather than obtain -- health insurance. There were thus four immediate votes cast to invalidate the mandate. No one at the table was surprised, based on the questions during oral arguments and word from law clerks inside the building circulating intelligence among the justices' chambers.
The votes of the liberals were known, too. Justice Ruth Bader Ginsburg, fifth in seniority, was the first to cast a vote to uphold the individual mandate. She believed Supreme Court precedent demanded the law be found constitutional. She was followed by Justice Stephen Breyer, who agreed with her. Next in seniority was conservative Samuel Alito, who cast the fifth and final vote to strike down the law. The eighth and ninth justices at the table, liberals Sonia Sotomayor and Elena Kagan, joined Ginsburg and Breyer in voting for the law as part of Congress' power to regulate interstate commerce.
There was no sign on March 30, 2012, that any of the nine would defy the usual ideological and partisan alignment. That political division bothered Roberts, but he felt just as strongly about boundaries on the commerce power as the other four in the majority did.
Regarding Medicaid, all four liberals voted to uphold the program, and Roberts joined them. At the same time, he expressed some tentativeness.
No vote had been taken related to congressional taxing power. It did not seem to matter, because the individual mandate was going to be struck down. The only uncertainty was whether any of Obamacare would survive.
Roberts did not want the entire law to fall. A pro-business conservative, he understood the importance of the insurance industry to US businesses, and he was genuinely concerned about invalidating an entire law that had been approved through the democratic process to solve the intractable health care problem.
But his four fellow conservatives believed that if the individual mandate was going down, it should take the whole law with it. They believed all the pieces were interlocked. Roberts thought the individual mandate was entwined with only two other provisions, those known as the "community rating" and "guaranteed issue." The community-rating section prevented insurers from charging some individuals higher premiums than others based on health status. The guaranteed-issue section required insurers to cover people regardless of pre-existing conditions.
As was his prerogative as chief justice, Roberts chose to write the majority opinion, giving him the ability to shape what the court would ultimately say. Senior liberal justice Ginsburg was ready to write for the dissenting foursome.
Soon after, Roberts began trying to persuade Kennedy to find that the unconstitutional insurance requirement could be severed from the rest of the law. But Kennedy -- often a swing vote on high-profile cases -- was firm in his position. He was puzzled, and then put off, by Roberts' view that the ACA provisions could be severed.
Later in April, Roberts tried another path. He began exploring whether, as the Obama administration had argued, the individual mandate could be upheld as a tax. (CBS's Jan Crawford reported earlier on Roberts' reversal on the mandate, but the full story of Roberts' switch, including on Medicaid expansion, and the changed votes of two liberal justices is detailed now for the first time.)
The chief justice then turned to Breyer and Kagan, the liberals most likely to work with him on contentious issues, to see if they could find common ground.
At the same time, Roberts began incorporating arguments that would invalidate the Medicaid expansion. This was a strange turn. None of the lower courts that had taken up the ACA had rejected the Medicaid expansion, and it wasn't seen as controversial in terms of constitutional debate and public controversy.
Roberts posited in a draft opinion that Congress had in effect held "a gun to the head" of the states by conditioning all Medicaid money on the expanded coverage. Yet he was not prepared to find that the expansion had to be scrapped altogether, only that states could not be forced to join through the leverage of losing all Medicaid funding.
Breyer and Kagan had voted in the private March conference to uphold the new Medicaid requirement, and their votes had been unequivocal. But they were pragmatists. If there was a chance that Roberts would cast the critical vote to uphold the central plank of Obamacare -- and negotiations in May were such that they still considered that a shaky proposition -- they were willing to meet him partway.
When Ginsburg found out about Roberts' new position, her first thought was, "It ain't over till it's over." She understood that the process could continue to be fluid, especially in such a monumental case.
"People change their minds about what they thought. So it isn't at all something extraordinary, and that's how it should work. We're in the process of trying to persuade each other and then the public," she told me in a 2012 interview in her chambers.
At the time, Ginsburg knew that Roberts was not deviating from his view of limited commerce clause power, and she wanted to make her dissent as persuasive as possible.
"I was forcing myself to stay awake and work on the opinion," Ginsburg said.
Another complication for Ginsburg was that in late spring she had fallen on the marble floor of her bathroom and cracked several ribs. There was nothing to be done except to work through the pain.
Scalia and the other conservatives were livid at the development. Scalia believed the taxing-power possibility had never truly been discussed in court, calling it a "fly-by-night briefing." Kennedy thought Roberts had presented his interpretation as "judicial modesty," when it amounted instead "to a vast judicial overreaching."
The decision was revealed on June 28, the last courtroom sitting of the 2011-12 session. As Roberts began reading his opinion from the bench, he tried to speak steadily, but he was nervous. About 13 minutes into the 20-minute announcement, after he had summarized various legal rationales, he misstated the overall judgment. Few noticed the slip because he had already laid out the reasoning.
As Roberts spoke, he occasionally looked out at the spectators. Among them was retired Justice John Paul Stevens, who later said he thought the chief had shown integrity.
"He had to be thinking he did the right thing," Stevens said in a 2016 interview in his chambers, "because he certainly made himself very unpopular" with the conservatives.
Perhaps Roberts' move was born of a concern for the business of health care. Perhaps he had worries about his own legitimacy and legacy, intertwined with concerns about the legitimacy and legacy of the court. Perhaps his change of heart really arose from a sudden new understanding of congressional taxing power. However the chief would explain it -- and he has not explained it beyond his written opinion -- the case added a new dimension to a man who insisted that he always decided cases based on the law.
Viewed only through a judicial lens, his moves were not consistent, and his legal arguments were not entirely coherent. But he brought people and their different interests together. His moves may have been good for the country at a time of division and a real crisis in health care, even as they engendered, in the years since, anger, confusion and distrust.
Criticism on the right -- from insiders and outsiders -- was swift, including from the Wall Street Journal editorial page, which described the decision as "shot through with confusion."
Donald Trump, three years from launching his presidential run, went right to Twitter: "Wow, the Supreme Court passed @ObamaCare. I guess Justice Roberts wanted to be part of Georgetown society more than anyone knew."
Trump later added: "John Roberts arrived in Malta yesterday. Maybe we will get lucky and he will stay there."