New York (CNN) Chief Justice John Roberts responded to attacks on the Supreme Court and the judiciary from both sides of aisle on Tuesday evening, saying that such criticism "does not affect how we do our work" and he said that the justices will "continue to decide cases" according to the Constitution and laws "without fear or favor."

"We don't go about our work in a political manner," Roberts said in New York City.

Criticism of the court, Roberts said, is "often based on a misperception" that the justices are divided 5-4 along familiar partisan lines and that, in fact, they sometimes form unusual alliances.

"The point is when you live in a politically polarized environment, people tend to see everything in those terms," Roberts said. "That is not how we at the court function, and the results of our cases do not suggest otherwise."

Roberts's comments, at a long-scheduled appearance at Temple Emanu-El, came just hours after House Democrats launched an impeachment inquiry into President Donald Trump. Were Trump to be impeached by the House, Roberts as chief justice would preside over a trial in the US Senate.