WASHINGTON — Incensed by a ruling against his migrant asylum policy, President Donald Trump demanded "some common sense" from America's judges and directed his ire at a liberal-leaning appeals court. He professed respect for Chief Justice John Roberts, with whom he is engaged in a startling public dispute over the independence of the judiciary, yet shrugged off the Republican appointee as someone who "can say what he wants."

Trump, still seething over Monday's decision by a President Barack Obama-nominated judge, began his Thanksgiving Day by asserting on Twitter that courts should defer to his administration and law enforcement on border security because judges "know nothing about it and are making our Country unsafe."

The president, spending the holiday in Florida, later told reporters that law enforcers and military service members he has sent to the U.S.-Mexico border "can't believe the decisions that are being made by these judges."

Trump has gone after federal judges before who have ruled against him, but the current dustup is the first time that Roberts, the leader of the federal judiciary, has offered even a hint of criticism of the president.

Roberts issued a strongly worded statement Wednesday defending judicial independence and contradicting Trump's claim that judges are partisans allied with the party of the president who nominated them.

It is highly unusual for a president to single out judges for personal criticism, and a chief justice's challenge to a president's comments is unprecedented in modern times.

In challenging a co-equal branch of government, Trump complains that his opponents file lawsuits in courts that are part of the liberal-leaning 9th U.S. Circuit Court of Appeals. That's where an appeal of the recent asylum ruling would normally go.

It's not unusual for those challenging a president's policies to sue in courts they consider likely to back their claims.

"Everybody files in the 9th Circuit," he said with exaggeration. "I think we're going to have stop that somehow. The judges are going to have to get together or Congress is going to have to get together and stop it because they're taking advantage of our country." Trump did not elaborate.

Conservative groups tended to bring challenges to Obama-era policies in Texas, part of the conservative-leaning 5th U.S. Circuit Court of Appeals in New Orleans.

"I like him and I respect him," Trump said about Roberts, "but i think we have to use some common sense. The 9th Circuit, everybody knows that it's totally out of control."

Trump began the holiday by tweeting that Roberts "can say what he wants, but the 9th Circuit is a complete & total disaster."

He even raised the topic during his call to service members, saying the 9th Circuit "has become a big thorn in our side. ... It's a terrible thing when judges take over your protective services, when they tell you how to protect the border. It's a disgrace."

With Roberts' court feeling the heat over the president's appointment of Justice Brett Kavanaugh, Roberts and several of his colleagues have gone out of their way to rebut perceptions of the court as a political institution divided between five conservative Republicans and four liberal Democrats.

Trump's appointments to the Supreme Court and lower federal courts have themselves spurred charges that the courts are becoming more politicized. Roberts, as the justice widely seen as closest to the court's middle, could determine the outcome of high-profile cases that split the court.

The new drama began with remarks Trump made Tuesday when he went after Jon S. Tigar, the San Francisco-based judge who had ruled against Trump's asylum order. The president claimed, not for the first time, that the 9th Circuit was biased against him.

Roberts had refused to comment on Trump's earlier attacks on judges, including the chief justice himself. But on Wednesday, after a query by The Associated Press, he spoke up for the independence of the federal judiciary and rejected the notion that judges are loyal to the presidents who appoint them.

"We do not have Obama judges or Trump judges, Bush judges or Clinton judges," Roberts said. "What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them."

He concluded: "The independent judiciary is something we should all be thankful for."

Trump responded by questioning the independence of federal judges appointed by his predecessor and confirmed by the Senate. He especially criticized judges on the 9th Circuit.

"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 president tweeted.

Trump has never been reticent about criticizing the judiciary. Last year, the president scorned the "so-called judge" who made the first federal ruling against his travel ban. During the presidential campaign, he criticized Roberts for the chief justice's decisive vote in 2012 to preserve President Barack Obama's health care overhaul.

Trump also referred to an Indiana-born judge of Mexican descent, who was presiding over a fraud lawsuit against Trump University, as a Mexican who would be unable to rule fairly because of Trump's proposal to build a wall along the U.S.-Mexico border.

The president's remarks on Tuesday came when a reporter asked for his reaction to a ruling by Tigar that put the administration's asylum policy on hold. Under that new policy, Trump declared no one could apply for asylum except at an official border entry point. That tends to back migrants up for weeks if not months. A number of migrants remain in Tijuana after traveling in a caravan to reach the U.S.

"Every case that gets filed in the 9th Circuit, we get beaten," Trump said. "And then we end up having to go to the Supreme Court, like the travel ban, and we won."

The president went on to say about the asylum ruling: "This was an Obama judge. And I'll tell you what, it's not going to happen like this anymore. "

The initial travel ban ruling in 2017 was issued by U.S. District Judge James Robart, an appointee of President George W. Bush in Washington state. Roberts, too, was appointed by Bush.

The 9th Circuit is by far the largest of the federal appellate courts, covering Alaska, Arizona, California, Hawaii, Idaho, Montana, Nevada, Oregon and Washington. Some Republicans in 9th Circuit states have proposed splitting the circuit in two, but legislation has not advanced.

The court 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.