WASHINGTON — Chief Justice John G. Roberts Jr. defended the independence and integrity of the federal judiciary on Wednesday, rebuking President Trump for calling a judge who had ruled against his administration’s asylum policy “an Obama judge.”

The chief justice said that was a profound misunderstanding of the judicial role.

“We do not have Obama judges or Trump judges, Bush judges or Clinton judges,” he said in a 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.”

That blunt statement may represent a turning point in the relationship between the heads of two branches of the federal government, which until Wednesday had been characterized by slashing attacks from the president and studied restraint from the chief justice.

Chief Justice Roberts, who was appointed by President George W. Bush, made his statement as he is adjusting to a new dynamic on the Supreme Court. The arrival last month of Mr. Trump’s second appointee, Justice Brett M. Kavanaugh, thrust the chief justice into the court’s ideological center, a spot that had long belonged to Justice Anthony M. Kennedy, who retired in July.