Chief Judge Roger L. Gregory of the U.S. Court of Appeals for the 4th Circuit. (Steve Helber/AP)

A substantial majority of the judges who sit on the U.S. Court of Appeals for the 4th Circuit in Richmond delivered a rather remarkable judgment last week: The president of the United States is not to be believed.

Will the Supreme Court conclude the same thing? And by “Supreme Court,” we mean “Justice Anthony M. Kennedy,” whose name was invoked 23 times in the 205 pages of majority opinions, concurrences and dissents in the appeals court’s 10-to-3 rejection of President Trump’s revised travel ban.

It appears that we will find out — the president’s lawyers are likely to ask the high court this week to overturn the 4th Circuit opinion. Perhaps the administration will find a more receptive audience at 1 First Street than it has to date for the argument that judicial attempts to peer into the chief executive’s motivations are inappropriate.

But it’s worth another look at the remarkable rhetoric in Chief Judge Roger L. Gregory’s majority opinion, which concludes that Trump’s “true reason” for the travel ban was not protecting the nation’s security but making good on a campaign promise born of anti-Muslim bias.

As Harvard law professor Noah Feldman put it in an essay for Bloomberg News, “It’s extraordinary for a federal court to tell the president directly that he’s lying; I certainly can’t think of any other examples in my lifetime.”

Gregory’s 79-page opinion, joined in full by six judges, opens with the finding that Trump’s executive order “drips with religious intolerance, animus and discrimination.” He devotes a large section to recounting Trump campaign rhetoric, tweets and website postings about imposing a ban on Muslims entering the country.

Gregory noted an interview that Trump gave in 2016, when challenged about whether banning Muslims would be constitutional. “People were so upset when I used the word Muslim. Oh, you can’t use the word Muslim,” Trump said. “Remember this. And I’m okay with that, because I’m talking territory instead of Muslim.”

“Just as the reasonable observer’s ‘world is not made brand new every morning,’ ” Gregory wrote, quoting from a Supreme Court precedent, “nor are we able to awake without the vivid memory of these statements.

“We cannot shut our eyes to such evidence when it stares us in the face, for ‘there’s none so blind as they that won’t see.’ ”

Trump’s first executive order, which Gregory called EO-1, was issued just a week after the president took office. It barred the entry of citizens of seven majority-Muslim nations (Iraq, Iran, Somalia, Sudan, Yemen, Syria and Libya), ordered a temporary halt to refu­gee arrivals and would have eventually given preference to those who were religious minorities in their countries, such as Christians. Several judges and a panel of the U.S. Court of Appeals for the 9th Circuit shut it down.

Trump vowed to go to the Supreme Court that time, too, but eventually issued a new order, which Gregory called EO-2. The order removed Iraq from the list, deleted references to religion and added national security rationales for the policy.

Gregory again doubted the president’s motives.

“Any national security justification for EO-2 was secondary to its primary religious purpose and was offered as more of a ‘litigating position’ than as the actual purpose of EO-2,” he wrote.

The president’s credibility took other hits in the 4th Circuit ruling in International Refugee Assistance Project v. Trump.

Judge Stephanie Thacker said she would not consider Trump’s statements during the campaign but that he had said enough in his short time as president to reveal his true intentions. She called the revised order “the proverbial wolf in sheep’s clothing.”

Judge James A. Wynn Jr. seemed to think Gregory had not gone far enough in his rhetoric; Wynn invoked in his concurrence the lessons of slavery and the internment of Japanese Americans during World War II.

“We again encounter the affront of invidious discrimination — this time layered under the guise of a President’s claim of unfettered congressionally delegated authority to control immigration . . . Laid bare, this executive order is no more than what the President promised before and after his election: naked invidious discrimination against Muslims.”

The three dissenting judges — all were nominated to the appeals court by Republican presidents, while those in the majority were nominated by Democrats — seemed stunned not just by the boldness of their colleagues but by what has happened to their court, which was once one of the nation’s most conservative.

Judge Paul V. Niemeyer said the majority breezed past Supreme Court rulings that give the president enormous power to make immigration policy and decide who is allowed to enter the country.

So long as the order is issued for a “facially legitimate and bona fide reason, the courts will neither look behind the exercise of that discretion, nor test it by balancing its justification against the [plaintiffs’] First Amendment interests,” the court has ruled.

The majority compounded its error, Niemeyer wrote, by relying on the campaign statements. He welcomed the next round of review.

“The Supreme Court surely will shudder at the majority’s adoption of this new rule that has no limits or bounds — one that transforms the majority’s criticisms of a candidate’s various campaign statements into a constitutional violation” he wrote.

Which brings things back to Kennedy. He is the pivotal member of the court, the justice most often in the majority when the divided court decides a controversial issue. But he is especially important on this issue.

In a 2015 case, Kennedy generally agreed with the rule that courts should not “look behind” immigration decisions. But, along with Justice Samuel A. Alito Jr., he said that an “affirmative showing of bad faith,” plausibly shown, might free courts to probe the rationale of a decision.

It is hardly clear how the Supreme Court will react to a case that mixes profound questions about the president’s power to protect the country, Congress’s grant of authority to the executive branch to make immigration decisions and the Constitution’s admonition that government not single out one religion for disparagement.

Niemeyer said his colleagues seem to acknowledge that the same directive issued by a different president would be acceptable. Has this president shown he should be treated differently?