Protesters rallied outside Trump International Hotel on Sunday, Jan. 29, against President Donald Trump’s refugee travel ban.

The U.S. Court of Appeals for the Ninth Circuit upheld an injunction against the third iteration of President Donald Trump’s travel ban executive order Friday.

The court, which heard oral arguments in the case last month, ruled that Trump exceeded his authority in issuing the Sept. 24 travel ban proclamation. The court said that, under the Immigration and Nationality Act, Trump could only ban immigrants based on nationality if he makes a “finding” that the entry of those individuals would be “detrimental to the interests of the United States.”

Trump, the three-judge panel ruled, failed to make such a finding before issuing the proclamation, which indefinitely bans immigrants from eight countries on the basis that those countries have insufficient information-sharing protocols when it comes to vetting immigrants and granting visas.

“The President is not foreclosed from acting to enhance vetting capabilities and other practices  in order to strengthen existing immigration law, but must do so in a manner consistent with Congress’s intent,” the per curiam opinion said. “Put another way, the President cannot effectively abrogate existing immigration law while purporting to merely strengthen it; the cure cannot be worse than the disease.”

The court, however, limited its ruling so that the injunction against the ban only applies to those with no bona fide relationship to the United States.

The case was brought by the state of Hawaii, a Muslim association and an individual affected by the Sept. 24 order. Hogan Lovells’ Neal Katyal, who represented the state, said on Twitter that the ruling was a “thorough repudiation of Trump’s position on both substance and procedure.”

In the opinion, the judges wrote that allowing the ban to take effect would be against the public interest.

“In assessing the public interest, we are reminded of Justice Murphy’s wise words: “All residents of this nation are kin in some way by blood or culture to a foreign land.’” the opinion said, quoting from the dissent in Korematsu v. United States. “It cannot be in the public interest that a portion of this country be made to live in fear.”

The court stayed its decision, pending review by the U.S. Supreme court.

A separate challenge to the travel ban, brought by several immigrant rights groups and individuals, is pending in the U.S. Court of Appeals for the Fourth Circuit. That court heard oral arguments on the case en banc last month,  just days after the Ninth Circuit.

Read the opinion below:

height=”480″>

Related stories:

Three Key Quotes From the Ninth Circuit’s Travel Ban 3.0 Hearing

With SCOTUS Cloud Overhead, Appeals Courts Take Up Travel Ban 3.0

What Are the Legal Issues in Trump Travel Ban 3.0?

Ninth Circuit Sides With Hawaii, Rules Grandparents Exempt From Trump’s Travel Ban