A federal judge in Seattle on Saturday partially lifted a Trump administration ban on certain refugees after two groups argued that the policy prevented people from some mostly Muslim countries from reuniting with family living legally in the United States.

U.S. District Judge James Robart heard arguments Thursday in lawsuits from the American Civil Liberties Union and Jewish Family Service, which say the ban causes irreparable harm and puts some people at risk. Government lawyers argued that the ban is needed to protect national security.

Robart ordered the federal government to process certain refugee applications but said his directive did not apply to people without a "bona fide relationship" to a person or entity in the United States.

President Donald Trump restarted the refugee program in October "with enhanced vetting capabilities."

The day before his executive order, Secretary of State Rex Tillerson, Acting Homeland Security Secretary Elaine Duke and Director of National Intelligence Daniel Coats sent a memo to Trump saying certain refugees must be banned unless additional security measures are implemented.

It applies to the spouses and minor children of refugees who have already settled in the U.S. and suspends the refugee program for people coming from 11 countries, nine of which are mostly Muslim.