Chief Justice John Roberts on Tuesday stressed the need for the judicial branch to remain independent, taking note of the tumultuous debate over the confirmation of Associate Justice Brett Kavanaugh to say that the high court makes mistakes when it yields to political pressures. In a speech at the University of Minnesota, Roberts said he wasn't there to criticize Congress or the executive branch.

"We do that often enough in our opinions," he said. But he said he wanted to stress how the judicial branch "must be very different" from the "political branches" elected by the people.

The courts "do not speak for the people," he said. "But we speak for the Constitution. Our role is very clear: We are to interpret the Constitution and laws of the United States and ensure that the political branches act within them."

Get Breaking News Delivered to Your Inbox

Roberts cited some landmark decisions that he said the Supreme Court would have decided differently if the justices had bowed to political pressure, including the Brown v. Board of Education decision against school segregation.

"The court has, from time to time, erred and erred greatly. But when it has, it has been because the court yielded to political pressure," he said, citing what he called the "shameful" case during World War II that upheld the internment of Japanese-American citizens.

Roberts also stressed the value of the court's tradition of collegiality. Before the justices go onto the bench to hear a case, and before they walk into the conference room to discuss it, he said they always pause for a moment to shake hands with each other.

Quoting from Kavanaugh's remarks during his ceremonial swearing in at the White House, Roberts called the tradition "a repeated reminder that, as our newest colleague put it, we do not sit on opposite sides an aisle, we do not caucus in separate rooms, we do not serve one party or one interest, we serve one nation. And I want to assure all of you that we will continue to do that, to the best of our abilities, whether times are calm or contentious."

Kavanaugh gives the court a 5-4 conservative working majority but the confirmation fight raised public concerns about the court's ability to rise above partisanship. President Donald Trump picked Kavanaugh to replace the retiring Anthony Kennedy, a key swing vote. Court watchers say Roberts, who was appointed chief justice by President George W. Bush in 2005, may now come closest to representing its center , even though he's more conservative than Kennedy was.

Roberts has expressed concern in previous speeches about the court being portrayed as a partisan political institution. And other justices have expressed concerns in recent weeks about public perceptions of the integrity of the court, as well as the need to preserve collegiality.

"Every single one of us needs to realize how precious the court's legitimacy is. You know we don't have an army. We don't have any money. The only way we can get people to do what we think they should do is because people respect us," Justice Elena Kagan said at Princeton University earlier this month.

Speaking at the same event, Justice Sonia Sotomayor said the nine justices "have to rise above partisanship in our personal relationships. We have to treat each with respect and dignity and a sense of amicability that the rest of the world doesn't always share."

Roberts appeared as part of a lecture series named for former University of Minnesota Law School dean Robert Stein. Previous lecturers in the series have included Supreme Court justices Sotomayor, Ruth Bader Ginsburg and Antonin Scalia.