A federal judge ordered the Trump administration in Washington, DC, on Friday to restore the White House press credentials of CNN’s Jim Acosta. But the appellate precedent underlying that order is wrong, so the Justice Department should continue appealing it all the way to the Supreme Court, where the case should be dismissed under the political-question doctrine.

Judge Timothy Kelly, a Trump appointee to the U.S. District Court for the District of Columbia, held that stripping Acosta of his press credentials violated due process rights under the Fifth Amendment and issued a temporary restraining order (TRO) for immediate reinstatement while the litigation is ongoing.

Although the transcript of Kelly’s verbal order is not yet posted on the court’s docket, it appears that he ruled that the White House created a limited public forum by opening its grounds to reporters at all, and that certain due-process rights attach to any government action taking away those rights. Kelly ruled that the White House’s action lacked such procedural protections.

This federal trial court is under the U.S. Court of Appeals for the District of Columbia Circuit. In 1977, the D.C. Circuit in Sherrill v. Knight ruled that the Secret Service violated the First Amendment when it denied a press pass to someone who posed no safety threat to the president, holding that security concerns are the only permissible grounds for denying such a pass.

Breitbart News editorialized that this D.C. Circuit decision was incorrect in cases where the press credentials are being denied via a White House decision, and that in such instances the case must be dismissed under the political-question doctrine. The D.C. Circuit was a liberal court in 1977 and never even ruled on whether and why it had the authority to adjudicate the matter.

I continue to stand by that assessment. As I explained regarding the Supreme Court’s 1962 case Baker v. Carr, which set forth the factors of the political-question doctrine:

One Baker factor is that a federal court cannot decide the matter “without expressing lack of respect due coordinate branches of government.” The White House is the president’s house. He lives there, and sleeps there. Yes, it has offices, but the White House is not a department; it is not an agency created by Congress and subject to standard congressional oversight. It is instead the residence of the independently elected head of state, and those who work there do so as part of his household staff. CNN and Acosta are asking a federal judge to order the president as to whom he must allow into his home. The executive branch is a separate, coequal branch from the judicial branch. It would be as much of an insult for a federal judge to tell the president that he must allow someone into his living room as it would be for the president to order the Supreme Court regarding whom the justices must allow into their courtroom.

The reality is that not every legal wrong can fixed by a court order. The political-question doctrine is based on that fact. Here, there is not even a legal wrong to remedy. President Trump should have won, and still could on appeal.

It is possible that Judge Kelly thought that the D.C. Circuit’s 1977 decision blocked him from considering the political-question doctrine. If so, then it is possible that this case must go to the D.C. Circuit, and then – because the D.C. Circuit’s current membership is unlikely to revisit its 1977 decision – to petition the Supreme Court.

It is hard to see how the president could lose this fight at the Supreme Court. It would astound the Founders who wrote the Constitution that a federal judge would ever order the president of the United States that the First Amendment and Fifth Amendment require him to allow an ill-mannered reporter into his house to antagonize him at a public event. In addition to saying that judges cannot order the president to allow people into his house, they would say that telling a single reporter that he had to do his reporting from outside the White House because of his grossly unbecoming antics does not violate free speech.

A TRO cannot be appealed in the federal system, but within days it will be converted into a preliminary injunction with a full written opinion. That injunction can they be taken to a higher court.

The D.C. Circuit’s 1977 decision has no value as legal precedent at the Supreme Court. If the Justice Department is willing to appeal this case all the way up, then President Trump should win in the end, just as he did in Trump v. Hawaiion the travel ban.

The case is CNN v. Trump, No. 1:18-cv-2610 in U.S. District Court for the District of Columbia.

Ken Klukowski is senior legal editor for Breitbart News. Follow him on Twitter @kenklukowski.