International travelers arrive on the day that President Trump's travel ban went into effect in June. (Brian Snyder/Reuters)

Grandparents and other extended relatives of people in the United States are exempt from President Trump's travel ban, as are refugees with a formal assurance from a government agency, a federal appeals court panel ruled Thursday.

The ruling from the U.S. Court of Appeals for the 9th Circuit is a blow to the government, which after the most recent Supreme Court compromise had been allowed to block refugees with assurances, though not grandparents and other extended relatives.

"Resettlement agencies will face concrete harms and burdens if refugees with formal assurances are not admitted," the judges wrote. "In the same way that the Court considered the harms of the U.S. citizen who wants to be reunited with his mother-in-law and the permanent resident who wants to be reunited with his wife, the employer that hired an employee, the university that admitted a student, and the American audience that invited a lecturer, the district court correctly considered the resettlement agency that has given a formal assurance for specific refugees."

The judges also said their ruling would take effect in just five days — on Tuesday — a significant decrease from the normal 52 days, saying that refugees' lives "remain in vulnerable limbo" in their current uncertain state. The government has estimated there are about 24,000 refugees with formal assurances.

A Justice Department spokeswoman said in a statement: "The Supreme Court has stepped in to correct these lower courts before, and we will now return to the Supreme Court to vindicate the Executive Branch's duty to protect the Nation."

The ruling does not get to the heart of whether the travel ban is lawful. The Supreme Court is scheduled to hear arguments on that next month. And given that the measure was supposed to have been temporary — 90 days for citizens of the six countries affected by the ban and 120 days for refugees — it is also possible that the dispute will be moot by then.

In the 9th Circuit, the parties had essentially been arguing over who could be excluded from entering the United States after the justices in June ruled that a limited version of the travel ban could take effect.

The high court had said officials could not enforce the measure on those with "a credible claim of a bona fide relationship" with a person or entity in the United States, but offered only limited guidance on what type of relationship would qualify.

"Close familial" relationships would count, the court said, as would ties such as a job offer or school acceptance letter that were "formal, documented, and formed in the ordinary course." The same standard applied to citizens of the six countries affected by the ban — Iran, Libya, Somalia, Sudan, Syria and Yemen — as well as all refugees.

The government initially sought to block grandparents and other extended relatives of people in the country from entering, along with refugees with formal assurance letters from resettlement agencies, but a U.S. district judge ultimately prevented the government from doing so. The Supreme Court then put on hold the portion of that district judge's ruling on refugees, but not on grandparents and other extended relatives of people in the United States. That led to the legal wrangling before the U.S. Court of Appeals for the 9th Circuit.

The 9th Circuit judges wrote that the government had not offered persuasive evidence that grandparents and other extended relatives did not count as "close" family members, rejecting the government's argument that they had drawn their position from immigration law. They rejected similar arguments on refugees with assurances.

The 9th Circuit opinion was written by Judges Michael Daly Hawkins, Ronald M. Gould and Richard A. Paez, all appointed by President Bill Clinton.