The stage seemed set for a sharp move to the right. Conservatives had celebrated in 2018 when Senate Republicans narrowly confirmed Brett M. Kavanaugh to replace Justice Anthony M. Kennedy, who had occupied the court’s center. Before, there had been four reliable conservatives; this year, for a full term, there would be five.
But the term that ended this week took on a dramatically different tone than conservatives — or many others — expected, with Chief Justice John G. Roberts firmly in control and steering the court on a middle course.
Led by Roberts, the justices dealt a defeat to Trump by rejecting his repeal of the program that shields Dreamers from deportation. They ended the term Thursday by ruling the president can be required to turn over his tax returns and financial records to a New York grand jury.
The court also staked out new ground on abortion, gay rights and apparently on guns.
Roberts cast the fifth vote to strike down a Louisiana abortion law that could have shut down most of the state’s clinics, saying he did so out of respect for precedent. Remarkably, the precedent came from a Texas case in which he had dissented.
For now, the chief justice looks to be standing in the way of a conservative drive to repeal the right to abortion. He appears to be playing a similar role in gun cases. And he signed onto a landmark decision by Justice Neil M. Gorsuch that vastly expanded job protections for gay, lesbian and transgender Americans.
The reaction from conservatives was harsh.
Sen. Josh Hawley (R-Mo.), a former clerk for Roberts in 2007, took to the Senate floor the day after the gay rights ruling to declare it “represents the end of the conservative legal movement or the conservative legal project as we know it.”
“Do you get the impression that the Supreme Court doesn’t like me?” Trump tweeted after his loss in the case involving Dreamers.
His friends say the 65-year-old Roberts is following through with the pledge he made in his confirmation hearings 15 years ago to demonstrate the court is in the business of law, not politics.
In speeches, Roberts has contrasted the court with much of Washington, where partisan politics treats compromise as a betrayal.
“We don’t work as Democrats or as Republicans,” the chief justice tells audiences.
This year, more than at any time in the recent years, the justices lived up to that pledge.
Justices Elena Kagan and Stephen G. Breyer, two of the court’s liberals, joined with Roberts in decisions that upheld claims of religious liberty made by conservative religious groups.
Meanwhile, Justices Kavanaugh and Neil M. Gorsuch, Trump’s two appointees, agreed with Thursday’s ruling by Roberts that rejected the president’s claims of absolute immunity to subpoenas.
Harvard law professor Richard Lazarus, an environmental law expert, has been friends with Roberts since they were roommates in 1980 when they first moved to Washington.
“What the chief is plainly striving to do is demonstrate to the American people that the court, unlike the other two political branches, is different,” he said.
“The court does its job best when the justices act like judges and not like politicians. Both the left and the right invariably condemn the justices as mere politicians whenever the court rules in a way they don’t like,” he added. In Roberts’ view, “there is truly something called law, and it is the justice’s job to apply it.”
As he has done in previous years, Roberts showed again that he is masterful at finding the middle ground on contentious issues.
The dispute over whether Trump had to turn over information about his finances to investigators was a separation-of-powers classic involving the president, Congress and the judicial system. Coming in an election year, it also had high political stakes.
Roberts wrote two opinions, both with 7-2 majorities, that went in opposite directions.
One ruled Trump had no right to refuse a subpoena from the New York grand jury, upholding the power of the judicial system. His second dealt at least a temporary defeat to House Democrats who demanded a decade’s worth of Trump’s financial records.
At the end of the day, the rulings provided some measure of satisfaction to each side — Trump will be able to shield his tax returns from public view at least until after the election, but a grand jury eventually will probably be able to probe his financial secrets.
The one thing that was clear amid conflicting claims of victory was that the chief justice had strongly rejected Trump’s claims of “absolute immunity.”
More than 200 years of American history refuted Trump’s claim and clearly established that no one is above the law, Roberts said.
“The public has a right to every man’s evidence,” he wrote, quoting a long-standing judicial maxim. “Since the earliest days of the Republic, ‘every man’ has included the President of the United States.”
“The chief has this term delivered to Trump a — very judicious — smack in the chops,” said Donald Ayer, a former Justice Department official under President George H.W. Bush.
Roberts, he said, seemed to be “working deliberately to show that he and the court are not in Trump’s pocket, even as they quite often hand down ideological cases that go his way.”
Even if conservatives were dismayed by the court’s turn, most progressives know the chief justice does not share their views on a wide range of issues.
“The fact that Roberts is now sometimes a swing vote on this court only shows how conservative the court as a whole really is,” said Elizabeth Wydra, president of the Constitutional Accountability Center, a progressive legal group.
As a reminder, the court with Roberts leading the way handed down three major rulings expanding legal protections for religious groups — a major priority for many conservative legal activists.
The court ruled that church-run schools and the parents who use them have an equal right to state scholarships or tuition grants if other private schools are eligible. Excluding church schools from such programs amounts to unconstitutional discrimination based on religion, Roberts wrote in a case from Montana.
Sometimes, religion deserves special treatment, not equal treatment, the chief justice said. The court ruled in favor of two Catholic schools in the Los Angeles area and shielded them from lawsuits by teachers they fired. The church’s right to control the teaching of the faith outweighed an employee’s right to be protected from otherwise illegal discrimination, the court ruled.
Sounding a similar theme, the court upheld most of a Trump administration regulation that exempts employers from providing insurance coverage for contraceptives to female employees if they have sincere religious or moral objections to doing so.
On other fronts, however, Roberts blocked conservative campaigns to change the nation’s laws.
Advocates of the 2nd Amendment thought the court was moving their way and repeatedly pressed the justices this year to expand gun rights to include carrying weapons in public and ownership of rapid-fire weapons.
Four of the conservative justices called for broadening gun rights. But the court stunned gun rights advocates by refusing to consider 10 appeals that challenged regulations from California to Massachusetts.
The apparent explanation was that the chief justice would not join with the four other conservatives on the issue.
Similarly, on abortion, Roberts’ ruling in the Louisiana case bitterly disappointed conservative activists.
The moment was reminiscent of 1992, when the confirmation of Justice Clarence Thomas to replace the legendary liberal Justice Thurgood Marshall gave the court an apparent majority to overturn Roe vs. Wade.
To the surprise of many, including their colleagues, Justices Sandra Day O’Connor, David Souter and Anthony Kennedy wrote an opinion in a case from Pennsylvania that said they would uphold the right to abortion based on the need to respect precedent.
Kennedy said he was personally opposed to abortion, but came to the conclusion the Supreme Court could not take away an individual right after having declared it as part of the Constitution.
This year, Roberts stood alone on abortion. The four liberal justices strongly supported abortion rights, while the four justices to his right were ready to uphold the Louisiana law and likely go further.
Roberts wrote a separate opinion that relied on that 1992 Pennsylvania case, Planned Parenthood vs. Casey.
“Casey reaffirmed the most central principle of Roe v. Wade … a woman’s right to terminate her pregnancy before viability,” Roberts wrote.
While states may regulate abortion, “under Casey, the State may not impose an undue burden on the woman’s ability to obtain an abortion,” he wrote. Respect for precedent, he said, meant the Louisiana law could not stand.
In the last two years, at least a dozen Republican-led states had enacted measures to ban most or all abortions, with lawmakers assuming that Kavanaugh’s arrival meant the high court was on the road toward eventually overturning Roe.
Now, in the aftermath of the Louisiana ruling, it appears the court will return to where it has been in recent decades, struggling over which individual regulations of legal abortion are permissible, now with Roberts in control of the pace.