(SEATTLE) — 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. He said his order applies to people “with a bona fide relationship to a person or entity within 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.

In his decision, Robart wrote that “former officials detailed concretely how the Agency Memo will harm the United States’ national security and foreign policy interests.”

Robart said his order restores refugee procedures in programs to what they were before the memo and noted that this already includes very thorough vetting of individuals.

In a statement, Department of Justice spokeswoman Lauren Ehrsam said: “We disagree with the Court’s ruling and are currently evaluating the next steps.”

The ACLU argued the memo provided no evidence for why additional security was needed and didn’t specify a timeframe for implementing the changes. The groups say the process for imposing the policy violated a federal law.

August Flentje, a Justice Department attorney, told the judge that the ban is temporary and “is a reasonable and appropriate way for agency heads to tackle gaps” in the screening process.

The lawsuits from the two groups were consolidated and represent refugees who have been blocked from entering the country.

The ACLU represents a Somali man living in Washington state who is trying to bring his family to the U.S. They have gone through extensive vetting, have passed security and medical clearances, and just need travel papers, but those were denied after the ban.

Lisa Nowlin, staff attorney for the ACLU of Washington, said in a statement they were happy for their client — “who has not yet had the opportunity to celebrate a single birthday with his younger son in person — will soon have the opportunity to hold his children, hug his wife in the very near future, and be together again as a family for the first time in four years.”

Two other refugees included in the Jewish Family Service lawsuit are former Iraqi interpreters for the U.S. Army whose lives are at risk because of their service.

Another is a transgender woman in Egypt “living in such extremely dangerous circumstances that the U.S. government itself had expedited her case until the ban came down,” said Mariko Hirose, a lawyer with the Jewish Family Service case.

Yet another is a single woman in Iraq, Hirose said. Her husband divorced her after she was kidnapped and raped by militants because she worked with an American company. Her family is in the U.S. but she’s stranded by the ban, Hirose said.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.