A court decision on President Donald Trump's travel ban has reopened a window for tens of thousands of refugees to enter the United States, and the government is looking to quickly close it.

The administration late Friday appealed directly to the U.S. Supreme Court after a federal judge in Hawaii ordered it to allow in refugees formally working with a resettlement agency in the United States.

U.S. District Judge Derrick Watson on also vastly expanded the list of U.S. family relationships that refugees and visitors from six Muslim-majority countries can use to get into the country, including grandparents and grandchildren.

The ruling Thursday was the latest twist in a long, tangled legal fight that will culminate with arguments before the nation's high court in October.

It could help more than 24,000 refugees who had already been vetted and approved by the United States but would have been barred by the 120-day freeze on refugee admissions, said Becca Heller, director of the International Refugee Assistance Project, a resettlement agency."Many of them had already sold all of their belongings to start their new lives in safety," she said. "This decision gives back hope to so many who would otherwise be stranded indefinitely."