In an extraordinary exchange on Wednesday, the Chief Justice of the United States defended the work of federal judges from criticism by the President of the United States, drawing a fiery response as President Donald Trump denounced judges appointed by former President Barack Obama for having a 'much different point of view,' which Mr. Trump says leaves the nation open to security threats from illegal immigration.

"Sorry Chief Justice John Roberts, but you do indeed have 'Obama judges,'" the President tweeted, a few hours after the Chief Justice took the rare step of publicly answering a question submitted by the Associated Press about the President's criticism of recent judicial decisions.

"We do not have Obama judges or Trump judges, Bush judges or Clinton judges," the Chief Justice told the AP in a written statement.

"What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them. That independent judiciary is something we should all be thankful for," Roberts added.

After playing golf at one of his courses in Florida, the President was clearly not pleased with the statement of the Chief Justice, as Mr. Trump took aim at the Ninth Circuit, and criticized rulings on questions of illegal immigration and crime.

"Very dangerous and unwise!" the President said. "Judicial Activism, by people who know nothing about security and the safety of our citizens, is putting our country in great danger."

The outburst from the President came after a ruling on Tuesday night by a federal judge in California, which blocked the implementation of a new executive action on immigration, that would have stopped all illegal immigrants from claiming asylum in the United States.

"Whatever the scope of the President's authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," wrote Judge Jon Tigar, in a direct rebuke of the President's order, issued earlier this month.

Some legal experts said they were puzzled over why the Chief Justice decided to speak up now, as President Trump has certainly had harsh criticism for the federal judiciary even before he won the 2016 election.

"Though I agree with CJ Roberts's general sentiments, his decision to intervene here creates an important precedent," said legal expert Josh Blackman.

"Specifically, what was it about President Trump's most recent statements that occasioned a response?" as Blackman said he thought the comments of the Chief Justice 'will backfire.'

It was the first time that Chief Justice Roberts had given any public hint of concern about criticism of the Judiciary by President Trump, who has not minced words about his frustration with various rulings that have slowed his travel order, efforts to end the DACA immigration program, and just this week, a ruling that stopped his effort to end asylum for illegal immigrants.

Mr. Trump had spurred widespread criticism during the 2016 campaign, when he sharply criticized a federal judge, claiming Judge Gonzalo Curiel would not be impartial, because he was a Mexican - though Curiel was born in Indiana.

"Trump’s goal is not to make a point about the Ninth Circuit," said Neal Katyal, a frequent legal critic of the President. "It is to delegitimize the courts (and the Chief Justice) because they, like the media and like DOJ, are an institution that serves as a check & balance against his impulsivity and reckless disregard for the rule of law."