(Photo by Olaf Zerbock)

(Photo by Olaf Zerbock)

The Supreme Court said today that it will consider arguments in the case against President Donald Trump’s travel ban this fall. In the meantime, the high court largely reinstated the president’s order barring travelers from six largely Muslim countries, overturning decisions from two lower courts.

The Supreme Court’s ruling carved out a significant exception, though, saying that the ban can’t be enforced against “foreign nationals who have a credible claim of a bona fide relationship with a person or entity in the United States.”

An earlier order caused panic at airports before being struck down by the courts. Trump then signed a new ban on March 6, stopping the U.S. from issuing visas to people from Iran, Libya, Somalia, Syria, Sudan, and Yemen for 90 days and pausing the refugee program for 120 days.

Courts in Hawaii and Maryland quickly suspended the order, and the decisions were upheld by appeals courts. “The history of public statements continues to provide a convincing case that the purpose of the Second Executive Order remains the realization of the long-envisioned Muslim ban,” wrote U.S. District Judge Theodore D. Chuang.

The Supreme Court said today that it will hear the case in October if it is not rendered moot by the end of the restrictions.

Trump called it “a clear victory for our national security” in a statement. “I cannot allow people into our country who want to do us harm. I want people who can love the United States and all of its citizens, and who will be hardworking and productive.”

The president said last week that the ban would be enacted 72 hours after the ruling.

Updated with Trump’s statement.