Washington CNN  — 

For much of Chief Justice John Roberts’ 13 years in the center chair on the Supreme Court, the direction of the law came down to the man who sat next to him, Anthony Kennedy, whose key vote and centrist-conservative reasoning steered cases from abortion to gay rights to the death penalty.

When Roberts did make a singular decision, siding with four liberals to uphold Obamacare in 2012, conservatives on and off the bench were outraged.

But the chief justice might have been playing a long game, as much concerned about the institutional future of the court and his reputation than the fate of one law. Now, the 63-year-old Roberts is poised to be both figuratively and literally in charge.

The native of Indiana who attended Harvard for college and law school, served as a Supreme Court law clerk, and worked in the Reagan White House counsel’s office, has always been on a trajectory to the highest echelons of the law.

Even before Kennedy, 81, announced his resignation on Wednesday, the recent term demonstrated how Roberts was subtly taking more control and countering Kennedy’s influence.

Gerrymandering

Roberts wrote the June 18 decision rejecting Wisconsin Democrats’ claim of partisan gerrymandering. In the past, Kennedy had been a counterweight to Roberts, seeking middle ground in this area of the law and suggesting judges might hear First Amendment claims that district maps were rigged in violation of voters’ right of party association. But Kennedy simply signed Roberts’s opinion and raised no concerns about extreme political gerrymanders.

Justice Elena Kagan, joined by the three other liberals, wrote separately about the possibility of a First Amendment challenge – which prompted Roberts to declare in his opinion that her statement did not matter because the court’s official decision was his.

RELATED: 9-0 ruling masks deep division on gerrymandering at Supreme Court

Same-sex marriage and Masterpiece Cakeshop

Roberts plainly affected Kennedy’s resolution of the religious challenge to gay rights this session. The appeal from a Colorado baker who refused to create a wedding cake for two gay men was the first major gay-rights dispute since Kennedy’s 2015 Obergefell v. Hodges decision declaring a right to same-sex marriage – a decision from which Roberts heatedly dissented.

But this time, Roberts united with Kennedy for the June 4 ruling that the Colorado civil rights commission that sanctioned the baker engaged in religious discrimination, based on a commissioner’s comments.

During oral arguments in the Masterpiece Cakeshop dispute last December, Roberts reinforced that line of thinking by noting that just one biased member of any panel can taint the decision of all.

Travel ban

Kennedy often penned the most significant rulings of the term, but Roberts owned the June 26 blockbuster upholding President Donald Trump’s travel ban on certain majority-Muslim countries. Kennedy broke off with a separate statement in Hawaii v. Trump, not to challenge Roberts’ legal reasoning, as sometimes happened – but to implicitly warn the President about the effect of his intemperate statements against immigrants.

“An anxious world must know that our Government remains committed always to the liberties the Constitution seeks to preserve and protect,” Kennedy wrote, “so that freedom extends outward, and lasts.”

Kennedy agreed with Roberts nearly 90% of the time on cases this session, according to SCOTUSblog statistics, and notably did not provide a single fifth vote for the liberals in a close 5-4 case.

Perhaps it was the nature of the controversies this term. Perhaps it was Roberts’ own success in navigating with Kennedy. But Kennedy’s influence already seemed to be receding.

SCOTUS with President Trump - 2
The favorites who could replace retiring Justice Kennedy
03:17 - Source: CNN

Close ties from the start

Roberts and Kennedy had a symbiotic relationship from the start. Roberts knew he needed Kennedy’s vote and worked to cultivate it. And Kennedy, junior in seniority to the chief justice – dubbed “first among equals” – depended on him for opinion assignments.

This term when he dissented from a Roberts’s opinion in Carpenter v. United States, declaring an individual’s cellphone location records protected by the Fourth Amendment, Kennedy repeatedly characterized his dissenting statement as “respectful” of Roberts’ majority position.

In their 13 years together, Kennedy – a Sacramento Republican appointed by President Ronald Reagan – usually broke from Roberts on racial issues such as affirmative action, on abortion and on gay rights.

Only once before this term did Roberts separate himself from Kennedy in a major case to support the four liberals. That happened in the 2012 controversy over the Barack Obama-sponsored Affordable Care Act. Roberts upheld it as a tax, and Kennedy could barely contain his anger as he dissented from the bench that June morning.

Roberts also provoked the wrath of Donald Trump with that move, long before he was President. Among Trump’s Twitter missives in 2012: “Congratulations to John Roberts for making Americans hate the Supreme Court because of his BS.”

During Trump’s 2016 presidential campaign, he said Roberts “turned out to be a nightmare for conservatives.”

In truth, Roberts has voted conservative on most issues, including to lift campaign finance regulations, diminish racial remedies and limit the grounds to bring class action lawsuits against corporations.

Are Kennedy precedents at risk?

Roberts’ challenge with the reconstituted conservative court will be deciding how far rightward to move. Many controversial rulings, including those affirming the right to abortion, were sealed by Kennedy’s vote.

And, like Roe v. Wade, they have become entrenched in American life.

RELATED: 5 Kennedy-authored Supreme Court opinions that changed America

Throughout the recently completed session, Roberts, along with Kennedy and the three other conservatives (Clarence Thomas, Samuel Alito and Neil Gorsuch) trimmed the effect of past cases and outright reversed a 1977 labor union precedent that permitted states to require non-union members to pay fees for collective bargaining.

The five-conservative majority, all Republican appointees, declared that practice a violation of free speech rights, over the dissent of the four justices appointed by Democrats.

Roberts speaks with reverence about principles of stability in the law and he regularly admonishes audiences that the justices are not political, that they decide cases only based on the law.

“We don’t work as Democrats or Republicans,” he said, for example, in a 2016 Boston speech.

With a new appointment by Trump, that assertion of nonpartisanship might become an even tougher sell.

james obergefell justice kennedy retirement 1
LGBT advocate: Devastated not strong enough word
01:44 - Source: CNN