As the Supreme Court headed into its final week, the looming question was whether the leader of the country's judiciary would hew to his conservative instincts or moderate to shield the court's institutional interests in these frenzied political times.

He did both. But where his views may matter most was in Thursday's decision that conclusively chokes off any federal challenges to extreme partisan gerrymandering . He was joined by the four other Republican-appointed conservatives on the bench.

Roberts then crossed the ideological divide and sided with the Democratically-appointed justices to throw in doubt whether the Trump administration may add a citizenship question to the 2020 census

Throughout the session that began in October, Roberts tamped down his usual conservatism at times. He sided with liberals at pivotal moments, such as in the census case, but also to preserve precedents on regulatory power and to prevent a restrictive Louisiana abortion law from taking effect.

He penned opinions that tried to minimize differences between the right and left. He wanted to project consensus and an aversion to politics. Off the bench, he even publicly criticized President Donald Trump. Yet, even as he asserted in partisan gerrymandering controversies from Maryland and North Carolina that he was keeping judges out of politics, he might have been playing right into it.

"Federal judges have no license to reallocate political power between the two majority political parties," Roberts insisted on Thursday, "with no plausible grant of authority in the Constitution, and no legal standards to limit and direct their decisions."

That prompted Justice Elena Kagan , joined by the court's three other on the left, to state in somber tones from the courtroom bench, "Of all the times to abandon the court's duty to declare the law, this was not the one. The practices challenged in these cases imperil our system of government."

Extreme partisan gerrymanders, guaranteeing that the political party controlling a statehouse and drawing voting districts retains power, have largely benefited Republicans across the country.

With the notable exception of that gerrymandering case, made possible with the fifth vote of Justice Brett Kavanaugh, who succeeded retiring Justice Anthony Kennedy , the annual term produced few blockbusters. Roberts, with Kavanaugh working in league at times, tried to diminish ideological differences among the nine. The court put off major cases on abortion rights, immigration and LGBTQ rights.

A single term offers a limited portrait. And both Roberts and Kavanaugh know well that they have many years, perhaps decades, ahead. The chief justice is now fully in charge of a reconstituted conservative court where he is the ultimate decider.

Bridging partisan divides in public

Last year's replacement of Kennedy by the more conservative Kavanaugh landed Roberts at the ideological center of the court. That, along with the fallout from the tumultuous Kavanaugh hearings, added a weight to the man who has held the center chair of the bench since his 2005 appointment by President George W. Bush.

Several times over the past several months, Roberts, now 64, made public statements emphasizing that the justices are not politicians in black robes.

"We do not sit on opposite sides of an aisle, we do not caucus in separate rooms, and we do not serve one party or one interest. We serve one nation," he said in Minneapolis in October.

In November, he issued a remarkable statement responding to Trump's complaint about a ruling against the administration by a liberal judge. "We do not have Obama judges or Trump judges, Bush judges or Clinton judges," Roberts said. "What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them."

In a February talk in Nashville, he added, "We are not just another part of the political process. People need to know that we're not doing politics. They need to know that we're doing something different, that we're applying the law."

In his own votes and opinions, Roberts seemed to want to prove that. He split from his conservative brethren and joined liberal justices several times in early, incremental cases, from abortion rights to asylum policy.

He sought to bridge differences where he could. "I write separately to suggest that the distance between the (Elena Kagan) majority and Justice (Neil) Gorsuch is not as great as it may initially appear," Roberts wrote in Wednesday's case of Kisor v. Wilkie.

Still, the absence of Kennedy was felt as the court took tough stands on appeals from condemned inmates and rolled back precedent that had allowed lower federal court judges to review extreme partisan gerrymanders.

That five-justice group on the right reversed two four-decade-old precedents that had been in their sights for years, prompting liberals to ask what cases the court would overrule next.

Liberal justice Stephen Breyer, for instance, even hinted at the possible reversal of Roe v. Wade, the 1973 ruling that made abortion legal nationwide, at some point down the road.

Whether Roberts would go that far and overturn the abortion-rights landmark remains a guessing game, as do Roberts' moves in crucial cases. The liberal justices' despair in the courtroom Thursday was palpable. Kagan expressed sadness and the others appeared frustrated and dispirited.

But a few minutes later, Roberts dismayed his fellow conservatives as he announced his vote against the administration on the census controversy . Critics have said a citizenship question is an attempt to intimidate noncitizens and Hispanic households and will lead to a decline in response rates and underrepresentation of minorities.

Justice Clarence Thomas, the longest-serving justice on the right wing, wrote the lead dissent in that case. He said Roberts' decision for the majority echoed "the din of suspicion and distrust that seems to typify modern discourse."

With perhaps a nod to the court's still controversial 2000 decision in Bush v. Gore, Thomas concluded, "In short, today's decision is a departure from traditional principles of administrative law. Hopefully it comes to be understood as an aberration -- a ticket good for this day and this train only."