The U.S. Supreme Court on Tuesday allowed President Donald Trump to broadly implement a ban on refugees entering the country from around the world.

The justices granted a request from the Trump administration to block a federal appeals court decision that, according to the Justice Department, would have allowed up to 24,000 additional refugees to enter the United States than would otherwise have been eligible.

The Supreme Court ruling gives Trump a partial victory as the high court prepares for a key October hearing on the constitutionality of Trump’s controversial executive order.

Trump signed an order on March 6 that banned travelers from six Muslim-majority countries – Iran, Libya, Somalia, Sudan, Syria, and Yemen – for 90 days and locked out most aspiring refugees for 120 days in a move the Republican president argued was needed to prevent terrorist attacks. The policy suspended travel to the United States from six Muslim-majority countries and locked out most refugees.

U.S. courts have since limited the scope of that order. In a ruling last week, the 9th U.S. Circuit Court of Appeals said grandparents, aunts, uncles, and cousins of legal U.S. residents would be exempt from the travel ban.

The Justice Department opted not to appeal that part of the 9th Circuit decision.

However, the 9th Circuit also ruled that Trump’s refugee policy was too broad, and the court allowed entry to refugees from around the world if they had a formal offer from a resettlement agency.

The Justice Department appealed, and the full Supreme Court on Tuesday sided with the administration in a one-sentence order.

A representative for the Hawaii attorney general, who challenged the administration in court, could not immediately be reached for comment.

Earlier on Tuesday, Hawaii said in a court filing that the U.S. government could still “bar tens of thousands of refugees from entering the country.” All the 9th Circuit ruling did is “protect vulnerable refugees and the American entities that have been eagerly preparing to welcome them to our shores,” the state’s lawyers added.