A court decision on US 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 appealed directly to the US Supreme Court after a federal judge in Hawaii ordered it to allow in refugees formally working with a resettlement agency in the United States.
US district judge Derrick Watson also vastly expanded the list of US family relationships that refugees and visitors from six Muslim-majority countries can use to get into the country, including grandparents and grandchildren.
The ruling on 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 September 30, a ceiling it hit this week.
The federal budget can accommodate up to 75,000 refugees, but admissions have slowed under Mr 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 US 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," Mr 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 is 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 travellers with a "bona fide relationship" with a person or an entity in the US. 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 US.
Judge Watson enlarged that group to include grandparents, grandchildren, brothers-in-law, sisters-in-law, aunts, uncles, nieces, nephews and cousins.