WASHINGTON — The Supreme Court on Wednesday temporarily upheld broad restrictions against refugees entering the United States but allowed grandparents and other relatives of American residents to come while legal challenges to the Trump administration’s travel ban move forward.

The justices, in a brief unsigned order, let stand part of a ruling from a federal judge in Hawaii that had narrowed the administration’s efforts to limit travel from six predominantly Muslim countries, an effort that has prompted confusion at the nation’s airports, a global outcry and much litigation since President Trump announced it a week into his presidency.

But the justices suspended a second part of the lower court’s ruling, standing firm for now against allowing an estimated 24,000 refugees from across the world to resettle in the United States.

In the terse order, Justices Clarence Thomas, Samuel A. Alito Jr. and Neil M. Gorsuch said they would have blocked the judge’s entire order while the case proceeds — including the part that allowed American residents’ grandparents and other relatives to travel to the United States from the six countries: Iran, Libya, Syria, Somalia, Sudan and Yemen.