SYDNEY — U.S. Supreme Court Chief Justice John Roberts, once dubbed “disgraceful” by President Donald Trump, said on Thursday that criticism from politicians won’t dissuade judges from doing their jobs.

In a question-and-answer session at the University of Melbourne’s law school, Roberts was asked about political criticism of the courts — a particularly relevant question for the justice, given that he was the target of a withering critique from Trump during the presidential campaign.

“We’re certainly not above criticism — it’s a free country,” Roberts replied. “It certainly doesn’t affect how we go about our job.”

In 2015, then-candidate Trump said in a speech to supporters that Roberts was “disgraceful” and a “disappointment” to conservatives, largely because the justice had voted to uphold key provisions of President Barack Obama’s 2010 health care law.

Roberts has not commented on Trump’s criticisms of him, or on the president’s disparaging remarks about other judges whose decisions have irked him. In February, Trump called U.S. District Judge James Robart a “so-called judge” after Robart imposed a temporary halt on Trump’s executive order barring people from seven predominantly Muslim countries from coming to the United States.

Asked later to elaborate on the reasons behind the Supreme Court’s decision to uphold Obama’s health care law, Roberts demurred, saying that the court’s written opinions are intended to speak for themselves.