The Supreme Court on Monday allowed the Trump administration to enforce part of its 90-day ban on travelers from six mostly Muslim countries, overturning lower court orders that blocked it.

The action is a huge victory for President Trump in the biggest legal controversy of his nascent presidency.

As a result of the decision, people from Iran, Libya, Somalia, Sudan, Syria and Yemen who do not have a “bona fide” relationship with a person, school, business or other entity in the US would be barred from entry.

“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,” the court wrote.

“As to these individuals and entities, we do not disturb the injunction. But when it comes to refugees who lack any such connection to the United States, for the reasons we have set out, the balance tips in favor of the Government’s compelling need to provide for the Nation’s security.”

Trump said last week that the ban would take effect 72 hours after it was cleared by courts.

Justice Neil Gorsuch, Trump’s appointee to the bench, along with Justices Clarence Thomas and Samuel Alito, dissented in part, saying they would have put the entire ban into effect immediately.