U.S. Chief Justice John Roberts, speaking at a New York synagogue on Tuesday night, lamented the perception that the Supreme Court is becoming politicized and that the justices’ decisions are guided primarily by their partisan affiliation.

Roberts’ concerns about the impression of the court comes during a highly-charged political moment when the judiciary is getting hit from all sides. President Donald Trump has repeatedly criticized federal courts and judges who have blocked his policies, while some Democratic politicians have implied that the court’s conservative majority is motivated mainly by politics instead of interpreting the law.

“When you live in a polarized political environment, people tend to see everything in those terms. That’s not how we at the court function and the results in our cases do not suggest otherwise,” said Roberts before hundreds in attendance at the Temple Emanu-El Streicker Center in Manhattan.

Roberts in November rebuked Trump after the Republican president called a judge who ruled against his policy barring asylum for certain immigrants an “Obama judge.”

In August, a handful of Democratic senators filed a brief in a firearms case the justices had agreed to hear, suggesting the high court was too influenced by politics. “The Supreme Court is not well. And the people know it,” the brief said.

FILE – Justices of the U.S. Supreme Court gather for a group portrait, Nov. 30, 2018.

The nine-member court, which begins its next term on Oct. 7, has a 5-4 conservative majority.

Roberts, 64, a conservative appointed by Republican President George W. Bush in 2005, said the justices do not work in a political manner. “A lot of criticism is based on a misperception of the court,” he said.

Roberts pointed out that of the court’s 19 decisions last term that split 5-4, only seven rulings divided along ideological lines.

Roberts has emerged as the court’s ideological center since the retirement last year of conservative Justice Anthony Kennedy, who sometimes joined the liberal justices in major rulings, including over gay rights and abortion.

Last term, some liberal justices also publicly raised the alarm over the pace at which the conservative majority was overruling precedents, a fear shared by abortion rights advocates and Democratic politicians over whether the court may overrule Roe v. Wade, the landmark 1973 Supreme Court ruling that legalized abortion nationwide.

On Tuesday, Roberts said the court must respect precedent.

There is “no reason to suppose that I and my eight colleagues are any better at discerning the meaning of the constitution than members of the courts that went before us,” he said.

Roberts also drew laughs and cheers from the crowd when, in a nod to liberal Justice Ruth Bader Ginsburg’s growing celebrity, he called her a “rock star.”