WASHINGTON — Chief Justice John Roberts directed a rare and pointed shot at President Trump on Wednesday, defending the federal judiciary in the wake of Trump’s criticism of an ‘‘Obama judge’’ who ruled against the administration’s attempt to bar migrants who cross the border illegally from seeking asylum.
‘‘We do not have Obama judges or Trump judges, Bush judges or Clinton judges,’’ Roberts said in a statement released by the court’s public information office. ‘‘What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them.’’
The Thanksgiving eve statement added: ‘‘That independent judiciary is something we should all be thankful for.’’
Supreme Court justices, and the chief in particular, hardly ever issue statements on news events. But it appeared Roberts was eager to counter Trump’s criticism when asked to comment by the Associated Press. The statement did not mention the president.
Later Wednesday, Trump responded to Roberts on Twitter, saying, ‘‘Sorry Chief Justice John Roberts, but you do indeed have ‘Obama judges,’ and they have a much different point of view than the people who are charged with the safety of our country.’’
The chief justice, who was appointed by President George W. Bush, is an aggressive defender of the judiciary and has frequently expressed concern about attacks on its impartiality, whether they come from the left or the right. He had made it clear last month that he felt the recent partisan battle over the confirmation of Justice Brett Kavanaugh had cast a shadow on the Supreme Court.
At an event at the University of Minnesota just after Kavanaugh’s confirmation, Roberts sought to assure that the court served ‘‘one nation’’ and not ‘‘one party or one interest.’’
‘‘Our role is very clear: We are to interpret the Constitution and laws of the United States, and to ensure that the political branches act within them,’’ he said. ‘‘That job obviously requires independence from the political branches. The story of the Supreme Court would be very different without that sort of independence.’’
The exchange began on Tuesday when Trump told reporters outside the White House that he was ‘‘going to put in a major complaint’’ against the federal judge who temporarily blocked his administration from denying asylum to migrants who illegally cross the southern border.
Judge Jon Tigar of the Northern District of California ruled late Monday that federal law clearly states that migrants can seek asylum anywhere on US soil.
‘‘Whatever the scope of the President’s authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden,’’ the judge, appointed by President Barack Obama, wrote.
Trump erupted about the decision. ‘‘This was an Obama judge. And I’ll tell you what, it’s not going to happen like this anymore,’’ the president said.
‘‘We will win that case in the Supreme Court of the United States,’’ he added.
Trump also complained that his opponents file lawsuits in courts that are part of California’s liberal-leaning Ninth Circuit, which covers several Western states. It’s not unusual for those challenging a president’s policies to sue in courts they consider likely to back their claims. Conservative groups tended to bring challenges to Obama-era policies in Texas, part of the conservative-leaning Fifth US Circuit Court of Appeals in New Orleans.
‘‘Every case that gets filed in the Ninth Circuit, we get beaten. And then we end up having to go to the Supreme Court, like the travel ban, and we won,’’ Trump said.
In his Twitter response to Roberts on Wednesday, Trump again attacked the Ninth Circuit, saying ‘‘a vast number’’ of its rulings on border and security issues are overturned: ‘‘We need protection and security — these rulings are making our country unsafe! Very dangerous and unwise!’’
The Ninth Circuit has long had a majority of judges appointed by Democratic presidents, with the current breakdown at 16-7. But Trump has the opportunity to narrow that edge significantly because there are six vacancies, and he already has nominated candidates for five of them.
Lower courts have not been accommodating to Trump’s efforts to crack down on illegal immigration. They have temporarily blocked his attempts to strip funding from ‘‘sanctuary’’ cities and rescind temporary work permits and deportation protections from roughly 1 million immigrants who were protected under past administrations.
But the Supreme Court last June upheld the president’s travel ban on people from certain Muslim-majority countries, in a 5-to-4 decision written by Roberts. The chief justice put aside comments that Trump had made about Muslims in ruling that the president had not exceeded his powers.
‘‘The issue before us is not whether to denounce the statements,’’ Roberts wrote. ‘‘It is instead the significance of those statements in reviewing a Presidential directive, neutral on its face, addressing a matter within the core of executive responsibility. In doing so, we must consider not only the statements of a particular President, but also the authority of the Presidency itself.’’
He added: ‘‘We express no view on the soundness of the policy.’’
Roberts has not commented on Trump before, even though Trump as a candidate called Roberts a ‘‘disaster’’ because of his vote with the court’s liberals to uphold the Affordable Care Act, more commonly known as Obamacare.
Liberals who follow the court and are often critical of Roberts applauded his Wednesday statement.
‘‘A remarkable rebuke of a President by a Chief Justice — offhand, I can’t think of any historical analogy even close,’’ Georgetown law professor Marty Lederman said in a tweet. ‘‘But then again, every day Trump breaches norms never before breached.’’Material from the Associated Press was used in this report.