WASHINGTON (AP) — Betraying no trust in an independent judiciary, President Donald Trump is using a federal appeals court in San Francisco as a punching bag for his frustrations about not getting his way on border security. He's spreading misinformation in the process and appearing to misunderstand how appeals work.

Trump drew an unusual rebuke from the nation's chief justice, John Roberts, earlier in the week after the president assailed the judge who rejected his migrant asylum policy as an "Obama judge." Roberts rejected the insinuation that judges are beholden to the presidents who nominate them.

On Thursday, Trump was still venting on Twitter.

TRUMP: "Justice Roberts can say what he wants, but the 9th Circuit is a complete & total disaster. It is out of control, has a horrible reputation, is overturned more than any Circuit in the Country, 79%, & is used to get an almost guaranteed result."

THE FACTS: Trump is wrong in suggesting that rulings by the 9th U.S. Circuit Court of Appeals are reversed by the Supreme Court more frequently than those of any other federal appeals court. And his description in an earlier tweet of the "shocking" number of overturned cases in the 9th Circuit belies the nature of the appeals system.

When the Supreme Court hears a case, it is more likely to overturn it than not. It does so about two-thirds of the time.

In the last term, the Supreme Court overturned 100 percent of the decisions of the 1st Circuit in Boston, the 3rd Circuit in Philadelphia and the 6th Circuit in Cincinnati. For the 9th Circuit, 86 percent were overturned.

Over the past five years, the Supreme Court overturned a greater percentage of rulings from the 3rd Circuit (92.3 percent), the 6th Circuit (85.1 percent) and the Atlanta-based 11th Circuit (81.8 percent) than from the 9th (77.4 percent), according to The Associated Press' analysis of statistics from the legal website Scotusblog.

The 9th is by far the largest of the 13 federal courts of appeals, covering Alaska, Arizona, California, Hawaii, Idaho, Montana, Nevada, Oregon and Washington. That means that in raw numbers, more cases are heard and reversed from the 9th year in and year out. But that does not make it the most frequently overturned.

On Monday, U.S. District Judge Jon Tigar, who'd been nominated by Democratic President Barack Obama, temporarily barred the Trump administration from refusing asylum to immigrants who cross the southern border illegally. Any appeal is likely to go to the 9th Circuit.

TRUMP: "It would be great if the 9th Circuit was indeed an "independent judiciary," but if it is why ... are so 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." — tweets Wednesday.

THE FACTS: It's not unusual for those challenging a president's policies to sue in courts they consider likely to back their claims, and it's true that the 9th Circuit is a liberal-leaning court. 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.

But "judge shopping," as Trump put it when railing against court decisions on immigration last year, is not that straightforward.

At the time, Trump was upset about a federal district judge who blocked his order to penalize cities that don't cooperate with U.S. immigration officials. It was the third time in two months that a federal judge had knocked down a Trump order dealing with immigration.

But the two local governments that sued to block Trump's order, San Francisco and Santa Clara County, are in California and therefore routinely file in the court in their neighborhood. And they don't get to choose a judge; that's assigned through a system that resembles a lottery.

The 9th Circuit has 16 judges appointed by Democratic presidents, seven by Republicans and six vacancies. Trump has nominated candidates for five of the openings.

He is likely to tilt the ideological balance of that court, as well as others.

But he can't count on them being "Trump judges."

It was Roberts, a nominee of Republican George W. Bush, who was the decisive Supreme Court vote preserving Obama's health care overhaul.

And it was U.S. District Judge Timothy Kelly who granted a temporary restraining order restoring access to the White House for CNN reporter Jim Acosta after the White House had pulled his credential. Kelly was put on the bench by Trump.