WASHINGTON (AP) — The Trump administration is seeking to close a legal window opened for tens of thousands of refugees to enter the United States.

The Justice Department is appealing a federal judge's order directly to the Supreme Court.

U.S. District Judge Derrick Watson has ordered the government to allow in refugees formally working with a resettlement agency in the United States. His order also vastly expands the list of U.S. family relationships that refugees and visitors from six Muslim-majority countries can use to get into the country. It includes grandparents and grandchildren.

In its appeal Friday night, the Justice Department disagrees with 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.