WASHINGTON (AP) -- A court decision on U.S. 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.

In its appeal, the U.S. Justice Department said Watson's interpretation of the Supreme Court's ruling on what family relationships qualify refugees and visitors from the six Muslim-majority countries to enter the U.S. "empties the court's decision of meaning, as it encompasses not just 'close' family members, but virtually all family members. Treating all of these relationships as 'close familial relationship(s)' reads the term 'close' out of the Court's decision."

Only the Supreme Court can decide these issues surrounding the travel ban, the Justice Department said. "Only this Court can definitively settle whether the government's reasonable implementation is consistent with this Court's stay," it said.

Watson's 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."

Citing a need to review its vetting process to ensure national security, the administration capped refugee admissions at 50,000 for the 12-month period ending Sept. 30, a ceiling it hit this week.

The federal budget can accommodate up to 75,000 refugees, but admissions have slowed under Trump, and the government could hold them to a trickle, resettlement agencies say.

"Absolutely this is good news for refugees, but there's a lot of uncertainty," said Melanie Nezer, spokeswoman for HIAS, a resettlement agency. "It's really going to depend on how the administration reacts to this."

Attorney General Jeff Sessions said the administration will ask the Supreme Court to weigh in, bypassing the San Francisco-based 9th U.S Circuit Court of Appeals, which has ruled against it in the case.

The Supreme Court allowed a scaled-back version of the travel ban to take effect last month.

"Once again, we are faced with a situation in which a single federal district court has undertaken by a nationwide injunction to micromanage decisions of the co-equal executive branch related to our national security," Sessions said. "By this decision, the district court has improperly substituted its policy preferences for the national security judgments of the executive branch in a time of grave threats."

The administration took a first step by filing a notice of appeal to the 9th Circuit, allowing it to use a rule to petition the high court directly. There's no timetable for the Supreme Court to act, but the administration will be seeking quick action that clarifies the court's June opinion.

The justices now are scattered during their summer recess, so any short-term action would come in written filings.

The administration has lost most legal challenges on the travel ban, which applies to citizens of Syria, Sudan, Somalia, Libya, Iran and Yemen.

The Supreme Court's ruling exempted a large swath of refugees and travelers with a "bona fide relationship" with a person or an entity in the U.S. The justices did not define those relationships but said they could include a close relative, a job offer or admission to a college or university.

The Trump administration defined the relationships as people who had a parent, spouse, fiance, son, daughter, son-in-law, daughter-in-law or sibling already in the U.S.

Watson enlarged that group to include grandparents, grandchildren, brothers-in-law, sisters-in-law, aunts, uncles, nieces, nephews and cousins.

Hawaii Attorney General Douglas S. Chin, who sought the broader definition, said Thursday's ruling "makes clear that the U.S. government may not ignore the scope of the partial travel ban as it sees fit."

"Family members have been separated and real people have suffered enough," Chin said.

---

Spagat reported from San Diego. Associated Press writers Julie Watson in San Diego, Jennifer Sinco Kelleher in Honolulu, Sudhin Thanawala in San Francisco and Sadie Gurman and Mark Sherman in Washington contributed to this report.