FILE - In this Sept. 27, 2016 file photo, 4th Circuit Court of Appeals, Chief Justice Roger Gregory, gestures during an interview in his office in Richmond, Va. The 4th U.S. Circuit of Appeals dealt another blow to President Donald Trump’s revised travel ban targeting six-Muslim majority countries on Thursday, May 25, 2017, siding with groups that say the policy illegally targets Muslims. “Congress granted the president broad power to deny entry to aliens, but that power is not absolute. It cannot go unchecked when, as here, the president wields it through an executive edict that stands to cause irreparable harm to individuals across this nation,” Gregory wrote. (AP Photo/Steve Helber, File)

FILE - In this Sept. 27, 2016 file photo, 4th Circuit Court of Appeals, Chief Justice Roger Gregory, gestures during an interview in his office in Richmond, Va. The 4th U.S. Circuit of Appeals dealt another blow to President Donald Trump’s revised travel ban targeting six-Muslim majority countries on Thursday, May 25, 2017, siding with groups that say the policy illegally targets Muslims. “Congress granted the president broad power to deny entry to aliens, but that power is not absolute. It cannot go unchecked when, as here, the president wields it through an executive edict that stands to cause irreparable harm to individuals across this nation,” Gregory wrote. (AP Photo/Steve Helber, File)

WASHINGTON (AP) — The Supreme Court may soon decide how courts are supposed to view presidential power in the age of Donald Trump.

The administration has promised a high court appeal of a ruling blocking the president’s ban on visitors from six majority Muslim countries. The case could be a major test for the young administration and for a court that has its 5-4 conservative majority restored with the confirmation of Trump nominee Neil Gorsuch as the ninth justice.

ADVERTISEMENT

First, the justices must agree to intervene — something they’ll probably do considering the importance of the issue. If so, then they will be dealing with an area of the law, immigration, where courts have given presidents a lot of leeway.

But the president’s power over immigration is not absolute, and several lower courts have prevented Trump from putting in place a temporary ban on travel to the U.S. by residents of Iran, Libya, Somalia, Sudan, Syria and Yemen.

The travel policy was first issued a week after Trump took office on Jan. 20 and then revised following initial unfavorable court rulings. The dispute is unusual because Trump himself has supplied much of the evidence that opponents said demonstrated that anti-Muslim prejudice lay behind the policy.

At issue in the case are statements Trump made during the campaign, in interviews and in his actions as president.

“We’ve never really had, at least in recent decades a case like this which involves blatant evidence of pretextual discrimination by the president himself and also in the immigration sphere,” said Ilya Somin, a professor at George Mason University’s Antonin Scalia Law School.

The 4th U.S. Circuit Court of Appeals ruled against the travel policy Thursday, saying that Trump’s comments helped show that the policy was “steeped in animus and directed at a single religious group.”

One key issue may be whether statements from candidate Trump should carry any weight. Three dissenting judges on the 4th Circuit said the statements shouldn’t because candidates say many things while campaigning and shouldn’t necessarily be held to them.

Josh Blackman, a professor at the South Texas College of Law in Houston, said he thinks the Trump factor that was central to the 4th Circuit’s ruling could be less pronounced at the Supreme Court.

ADVERTISEMENT

The court could pay more attention to declarations from Attorney General Jeff Sessions and Homeland Security Secretary John Kelly in support of the policy. “The justices recognize their decisions will long outlive Donald J. Trump. They’ll be a little more careful to recognize that this isn’t only for or about Trump,” Blackman said.

Yet it may not be possible for the justices to separate the issue from Trump himself, said Richard Primus, a University of Michigan law professor.

“If a different president had issued this order, would it be unconstitutional? The question falsely assumes that another president could have issued this order. This order only makes sense from an administration that wants to demonstrate to its constituency that it doesn’t like Muslims,” Primus said. “Neither Obama nor Clinton, or either President Bush, would have issued this order.”

It’s hardly clear how the Supreme Court might eventually rule in the case, but Justice Anthony Kennedy probably will be in the majority whatever the outcome. That’s because Kennedy, closer to the ideological center of the court than any of his colleagues, often casts the decisive vote when the court is otherwise split between conservatives and liberals.

Both sides in the dispute have pointed to an opinion Kennedy wrote in 2015 in Kerry v. Din, a case in which an American citizen sought to challenge the denial of a visa for her Afghan husband.

Kennedy sided with the other conservative justices in favor of the Obama administration and against U.S. citizen Fauzia Din. But 4th Circuit Chief Judge Roger Gregory used Kennedy’s opinion to buttress his majority opinion against the Trump travel ban.

Judges must “step away from our deferential posture and look behind the stated reason for the challenged action” when a lawsuit makes a strong argument about bad faith motivating the policy, Gregory wrote, citing Kennedy’s opinion.

The dissenting judges said Gregory misread Kennedy’s opinion. “Nowhere did the Din Court authorize going behind the government’s notice for the purpose of showing bad faith,” the dissenters said.

Kennedy could well settle the disagreement over what he meant, and whether the travel ban is upheld or falls.