SAN FRANCISCO (AP) — US appeals court refuses to reinstate President Trump's ban on travelers from seven Muslim-majority nations.

Three federal judges unanimously rejected the Justice Department's arguments that the president's authority on immigration policy is his discretion alone, with no authority for review by the courts.

The panel from the 9th U.S. Circuit Court of Appeals said there's no precedent to support that notion, which "runs contrary to the fundamental structure of our constitutional democracy.''

The judges noted that Washington state and Minnesota had raised serious allegations about religious discrimination in President Donald Trump's ban on seven predominantly Muslim countries.

The president reacted to the decision Thursday night:

It is likely that the Justice Department will appeal the decision to the Supreme Court.

That could run the risk of having only eight justices to hear the case, which could produce a tie and leave the lower-court ruling in place.

Josh Blackman, a professor at South Texas College of Law in Houston, said, "There's a distinct risk in moving this too quickly. But we're not in a normal time, and Donald Trump is very rash. He may trump, pardon the figure of speech, the normal rule.''

Trump's order, which he signed Jan. 27, had banned entry to the United States by residents of seven Muslim-majority countries — Iraq, Syria, Iran, Libya, Somalia, Sudan, and Yemen — for 90 days.

The executive order had also banned U.S. entry of those fleeing war-torn Syria indefinitely, and had banned the admission of all refugees for the next four months.

Last week, U.S. District Judge James Robert in Seattle issued a temporary restraining order, halting the measure after Washington State and Minnesota sued.

Saturday, the Justice Department asked a federal appeals court to set aside a judge's order that temporarily blocked the ban.

The federal government's request for an emergency stay was filed Saturday night with the 9th U.S. Circuit Court of Appeals.

The administration on Saturday moved to suspend enforcement of the travel ban as the Justice Department readied its legal challenge.

Donald Trump had lashed out at Robart on Twitter, calling him a "so-called judge."

The court countered Thursday that no one from the countries committed a terror attack in the United States.

In a 29-page decision, they write: "the Government has not offered any evidence or even an explanation of how the national security concerns that justified those designations, which triggered visa requirements, can be extrapolated to justify an urgent need for the Executive Order to be immediately reinstated."

"We have a situation where the security of our country is at stake," Trump disagreed Thursday night, in an audio recording. "And it's a very serious situation, so we look forward, as I just said, to seeing them in court."

Opponents of the ban had said the ban unconstitutionally discriminated against Muslims.

The court decided to put aside consideration of that hot-button issue.

Instead, they ruled that travelers — even non-American citizens — were denied due process before travel, like a hearing.

"We are a nation of laws and as I have said, as we have said, from Day One, that those laws apply to everybody in our country, and that includes the president of the United States," Washington State Attorney General Bob Ferguson said.

Other states joined Washington State in the suit, including New York State.

Even before Thursday's ruling, Trump's legal setbacks had him unleashing criticism against the legal system.

That prompted accusations he is violating the traditional separation of powers.

Even his nominee to the Supreme Court, Neil Gorsuch, called it "disheartening and demoralizing."

It's unclear whether Gorsuch will be on the nation's highest bench in time to potentially weigh an argument against the man who nominated him.

Meanwhile, reactions to the decision are pouring in, divided along predictable lines — even from Trump's rival in November's election: