WASHINGTON (Reuters) - U.S. Chief Justice John Roberts cemented his new role as the Supreme Court’s “swing vote,” angering people on the political left and right in the process, as he decided the outcomes of major rulings on the census and electoral map manipulation.

FILE PHOTO: Chief Justice of the Supreme Court John Roberts attends a memorial for former House Minority Leader Bob Michel at the Capitol Building in Washington March 9, 2017. REUTERS/Aaron P. Bernstein/File Photo

Roberts, appointed by Republican President George W. Bush in 2005, sided with his fellow conservative justices in rejecting challenges to a practice called partisan gerrymandering but joined the court’s liberals in dealing to a damaging blow to President Donald Trump’s plan to add a contentious citizenship question to the 2020 census. Both rulings were 5-4.

Thursday’s action marked a dramatic final day of rulings for the court, which has a 5-4 conservative majority. With the 2018-2019 term concluded, there is now a three-month break before the cases are argued again in the next term.

The votes by Roberts in the two biggest cases of the term demonstrated that he is no longer the central figure on the court merely by nature of where he sits: in the middle of the mahogany bench in the ornate courtroom, with four justices on either side. He is also its ideological center, a role he inherited following the retirement last year of Justice Anthony Kennedy.

“I think this is now clearly the Roberts court. Chief Justice Roberts is no moderate but he is the swing vote,” said Jessica Levinson, a professor at Loyola Law School in Los Angeles.

Kennedy had for years served as the court’s swing vote, sometimes breaking with his fellow conservatives to join the liberal justices in major rulings on subjects including gay rights and abortion. But the court has shifted to the right over the years, leaving the conventionally conservative as Roberts as its de facto centrist.

Roberts, the product of a comfortable middle-class upbringing in Indiana where he attended Catholic schools, has a genial demeanor on the bench and avoids the hard-edge writing in opinions that some justices on the right and left occasionally employ. Before becoming a judge, Roberts was a renowned Supreme Court lawyer in private practice and served in the administrations of Republican presidents Ronald Reagan and George H.W. Bush, the father of the president who appointed him as chief justice.

TANGLES WITH TRUMP

Roberts’ temperament stands in stark contrast to the confrontational Trump, who has chided the chief justice in the past. Roberts, who administered the oath of office to Trump in January 2017 when he was sworn in as president, in November defended the independence of the federal judiciary after Trump called a judge who ruled against his policy barring asylum for certain immigrants an “Obama judge.”

The chief justice’s rulings on Thursday provoked harsh responses from various quarters.

“I’m all for impeaching the Chief Justice for lying to all of us about his support for the Constitution,” conservative activist Matt Schlapp wrote on Twitter in response to the census ruling, a setback to Trump.

Slideshow ( 2 images )

But liberals were just as incensed by his opinion in the gerrymandering cases in which the conservative majority closed the door on challenges in federal court to electoral maps drawn to favor one party over another.

Eric Holder, who served as attorney general under Trump’s Democratic predecessor Barack Obama, wrote on Twitter that the decision “tears at the fabric of our democracy and puts the interests of the established few above the many.”

Trump replaced Kennedy with Brett Kavanaugh, who most legal experts think is the more conservative of the two. Kavanaugh joined the conservatives in both rulings on Thursday.

Legal experts point to what they believe is Roberts’ concern that the Supreme Court not seem like a branch of the Republican Party, even with five Republican-appointed justices. The census ruling against a Republican president served as a counterpoint to the gerrymandering ruling, which most people who follow the issue believe favors Republicans more than Democrats even though both parties have engaged in the practice of manipulating electoral district boundaries for partisan gain.

During his Senate confirmation hearing in 2005, Roberts famously told senators he saw the role of a judge as similar to a baseball umpire, a purely neutral arbiter.

“He doesn’t want to do something that seems too clearly political that it could make people think that the court is not calling balls and strikes,” said Carolyn Shapiro, a professor at Chicago-Kent College of Law in Chicago.

Trump himself presents an additional problem for Roberts.

“He doesn’t want to be taken for a fool and he doesn’t want to be seen as a pawn or that he doesn’t have his own independent constitutional role,” Shapiro said of Roberts.

The census ruling in particular showcased the willingness of Roberts to craft compromises.

While the court ruled against Trump on the rationale his administration gave for adding the citizenship question, Roberts and his fellow conservatives prevailed on a separate part of the ruling in which the court decided that the Constitution does not block inclusion of a citizenship question in the future.

“He advanced conservative judicial skepticism of the administrative state, handed a short-term victory to progressives, and still left open the possibility that the census question will prevail,” said Josh Blackman, a professor at South Texas College of Law in Houston.

The decision in some ways mirrors Roberts’ 2012 opinion upholding the constitutionality of the Affordable Care Act, also known as Obamacare, while undermining it in another part of the decision. Like his ruling on the census, it prompted criticism from the right.

“Congratulations to John Roberts for making Americans hate the Supreme Court because of his BS,” Trump tweeted at the time.