The United States Supreme Court will hear arguments regarding President Donald Trump's travel ban in October, the court said on Monday. It will stay parts of the injunctions against the ban, allowing parts of it to go into effect.

The court quashed the injunctions placed on the ban by lower courts to the extent they "prevent enforcement with respect to foreign nationals who lack any bona fide relationship with a person or entity in the United States." In other words, individuals from the six Muslim-majority countries identified in President Trump's revised executive order with ties to the U.S. will not be affected by the ban, those without ties will. That includes refugees.

"An American individual or entity that has a bona fide relationship with a particular person seeking to enter the country as a refugee can legitimately claim concrete hardship if that person is excluded. As to these individuals, we do not disturb the injunction," the court wrote. "But when it comes to refugees who lack any such connection to the United States...the balance tips in favor of the Government's compelling need to provide for the Nation's security."

Trump has signed two executive orders since taking office to bar travel to the United States from Muslim-majority countries, both of which have been met with legal challenges. His revised order was put on hold by lower court judges in Hawaii and Maryland, and two federal appeals courts kept their decisions in place.

The White House on Monday released a statement reacting to the Supreme Court's decision, calling it "a clear victory" for national security. "As President, 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," Trump said.

The government argues the orders are necessary for national security reasons. Others say they are thinly veiled attempts at religious discrimination. 

Dozens of companies have come out in opposition to Trump's travel ban. More than 100 firms, including Apple (AAPL) - Get Report , Facebook (FB) - Get Report , Google (GOOGL) - Get Report , Microsoft (MSFT) - Get Report , Netflix (NFLX) - Get Report and Twitter (TWTR) - Get Report , in February filed papers in court arguing that the order "violates the immigration laws and the Constitution." Goldman Sachs (GS) - Get Report chief executive Lloyd Blankfein said the order was "not a policy we support," and Amazon's (AMZN) - Get Report Jeff Bezos reached out to affected employees to assure them "the full extent of Amazon's resources are behind you." 

The ACLU, which has been one of the groups leading the fight against Trump's travel ban, reacted to the Supreme Court's decision on Twitter and anticipated the fall hearing.

Updated with Trump statement.