A three-judge panel of the 9th U.S. Circuit Court of Appeals has repeated the mistakes made by the district court judge who stayed President Donald Trump’s executive order temporarily suspending visas from seven terrorist havens.

Both the judge in Washington state and the San Francisco-based circuit court have now refused to recognize the authority of Congress and the president to make this national security decision.

Neither the judge in Washington state nor the court has offered anything approaching a detailed discussion of 8 U.SC. §1182 (f), the law which specifically gives the president authority to suspend the entry of any aliens into the U.S. if he believes their entry would be “detrimental to the interests of the United States.”

Unless this statutory provision is unconstitutional, the president has acted completely within the law.

The 9th Circuit gives lip service to the fact that “courts owe substantial deference to the immigration and national security policy determinations of the political branches—an uncontroversial principle that is well-grounded in our jurisprudence.”

Inexplicably, it then proceeds to give no deference to the president’s policy determination that a temporary suspension is necessary to ensure that adequate vetting procedures are in place.

The court also gives no deference to the decision of Congress to delegate its plenary power over immigration to the president on this issue.

The 9th Circuit also claims that there is “no evidence that any alien from any of the countries named in the Order has perpetrated a terrorist attack in the United States.”

But as Washington Examiner journalist Byron York reports, that’s simply not true. In fact, there is plenty of this sort of evidence:

Last year, the Senate Judiciary subcommittee on immigration and the national interest released information showing that at least 60 people born in the seven countries had been convicted—not just arrested, but convicted—of terror-related offenses in the United States since Sept. 11, 2001.

And that number did not include more recent cases like Abdul Artan, a Somali refugee who wounded 11 people during a machete attack on the campus of Ohio State University last November.

Instead of discussing the relevant statute under which the president acted, the 9th Circuit instead engages in an extensive discussion of its concern that the executive branch is failing to provide due process to aliens barred from entry into the United States.

While it can certainly be argued that permanent resident aliens may have certain due process rights before their residency status can be canceled, the White House has already said the order does not apply to permanent residents.

The court’s apparent opinion that other aliens who don’t live in the U.S. have due process rights if they are refused entry can only be true if they have a constitutional right to enter the U.S.

That is an absurd proposition, yet that is the end result of the court’s opinion: that a foreign alien can demand a hearing and due process rights if one of our embassies refuses to give the alien a visa.

So far in the numerous lawsuits that have been filed against this executive order, the only federal judge to get it right is Nathaniel Gorton of the District Court of Massachusetts.

He analyzed the relevant statute, 8 U.S.C. §1182(f), and concluded that the executive order is fully within the president’s authority: “The decision to prevent aliens from entering the country is a ‘fundamental sovereign attribute’ realized through the legislative and executive branches that is ‘largely immune from judicial control.'”

Contrary to the 9th Circuit, Gorton says the executive order is “facially legitimate and bona fide.”

The 9th Circuit’s ruling has as little basis in the law as the original decision by the district court judge. It is just another example of arrogant federal courts grabbing power from the legislative and executive branches in violation of basic separation-of-powers principles.

After the decision was announced, Trump tweeted, “The security of our nation is at stake.” He is right.

Note: This article was originally published by Fox News.