WASHINGTON — In a highly unusual public statement, Chief Justice John Roberts rebutted President Donald Trump's statement that a ruling against the administration was made by "an Obama judge."

Asked Wednesday by the Associated Press about the president's comment, Roberts responded, "We do not have Obama judges or Trump judges, Bush judges or Clinton judges. What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them."

He added on the day before Thanksgiving that an "independent judiciary is something we should all be thankful for."

It's the first time the Republican-appointed leader of the federal judiciary has offered even a hint of criticism of Trump, who has previously blasted federal judges who ruled against him.

The president responded several hours later in a string of tweets, claiming there are, in fact, "Obama judges" and attacking the Ninth Circuit court.

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. It would be great if the 9th Circuit was indeed an “independent judiciary,” but if it is why...... — Donald J. Trump (@realDonaldTrump) November 21, 2018

.....are so many opposing view (on Border and Safety) cases filed there, and why are a vast number of those cases overturned. Please study the numbers, they are shocking. We need protection and security - these rulings are making our country unsafe! Very dangerous and unwise! — Donald J. Trump (@realDonaldTrump) November 21, 2018

“79% of these decisions have been overturned in the 9th Circuit.” @FoxNews A terrible, costly and dangerous disgrace. It has become a dumping ground for certain lawyers looking for easy wins and delays. Much talk over dividing up the 9th Circuit into 2 or 3 Circuits. Too big! — Donald J. Trump (@realDonaldTrump) November 21, 2018

Trump made his initial comment on Tuesday about the "Obama judge" in response to questions about Monday's ruling by Federal District Court Judge Jon Tigar in San Francisco that put a temporary hold on the administration's plan for refusing to consider asylum applications from immigrants who cross the border illegally.

"You go the 9th Circuit and it's a disgrace," Trump said. "And I'm going to put in a major complaint because you cannot win — if you're us — a case in the 9th Circuit and I think it's a disgrace. This was an Obama judge. And I'll tell you what, it's not going to happen like this anymore."

Tigar was nominated by President Barack Obama, but Roberts has consistently pushed back against claims that judges made decisions based on political considerations.

"I will not criticize the political branches," he said in a speech in October. "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."

President Donald Trump shakes hands with Chief Justice John Roberts as he arrives to deliver an address to a joint session of the U.S. Congress on Feb. 28, 2017. Jim Lo Scalzo / Pool via Getty Images file

Even so, Roberts has had resisted responding directly to Trump's attacks on judges.

Trump said it was a "so-called judge" who issued the first federal ruling against his travel ban. During the 2016 presidential campaign, after calling for a wall on the southern border, he said U.S. District Judge Gonzalo Curiel might be biased against him in a trial over Trump University because of the judge's Mexican heritage.

Trump's latest remarks come as the Supreme Court is enmeshed in controversy over his appointment of Justice Brett Kavanaugh. Several justices have spoken out about judicial independence and the danger of having the court viewed as a political institution that is divided between five conservative Republicans and four liberal Democrats.

The White House had no immediate response to a request for comment on Roberts' criticism on Wednesday.