After hearing heartbreaking stories of refugees who have struggled to reconnect with their families and listening to the plight of others who strive to leave dangerous situations, a federal judge said he would try to issue a ruling on a motion to block a Trump administration ban on refugees before Christmas.

Late on the day before Christmas Eve, U.S. District Judge James Robart released a 65-page order that gave relief to both groups: He granted a nationwide injunction that blocks the administration's restrictions on the process of reuniting refugee families and partially lifted a ban on refugees from 11 mostly Muslim countries.

Robart limited that part of the injunction to refugees who have a bona fide relationship with people or entities in the U.S., but said refugees who have formal agreements with refugee resettlement agencies or humanitarian organizations constitutes such a relationship.

"At stake in this decision is a question particularly poignant around the holidays - family reunification," said Mary Fan, a professor at the University of Washington Law School.

President Donald Trump restarted the refugee program in October "with enhanced vetting capabilities." Secretary of State Rex Tillerson, Acting Homeland Security Secretary Elaine Duke and Director of National Intelligence Daniel Coats also wrote a memo that specified the categories of the refugees who should be banned.

The new executive order banned entry of spouses and minor children of refugees who have already settled in the U.S., referred to as "follow-to-join" refugees, and suspended the refugee program for people coming from 11 countries, nine of which are mostly Muslim.

About 2,500 refugees in the U.S. are able to reunite with their families through the "follow-to-join" process, Robart said.

The American Civil Liberties Union sued the administration on behalf of a Somali man, using the pseudonym Joseph Doe, who has spent years trying to bring his wife and children to his new home in Washington state. The ACLU case was consolidated with one filed by Jewish Family Service, which challenged the administration's prohibition of refugees from certain countries until the vetting process could be reviewed.

Department of Justice lawyers argued in a hearing Thursday that the ban was a temporary and reasonable way for agencies to deal with gaps in the screening process. The restrictions were placed in the interest of national security, they said.

But ACLU and Jewish Family Service lawyers said the process for implementing the ban violated the law.

"The ACLU's motion was focused on how particularly arbitrary the follow-to-join provision was, given that over 70 percent of those refugees are children under 16," said Tana Lin, ACLU of Washington cooperating attorney with the firm Keller Rohrback. "Requiring special memos on preschool children like Joseph Doe's 4- and 5-year-old sons does not make our nation safer."

Mariko Hirose, a lawyer on the Jewish Family Service case and litigation director for International Refugee Assistance Project, said the Trump administration has attacked refugee resettlement since the first travel ban, leaving vulnerable refugees in limbo.

The plaintiffs named in both lawsuits face difficult challenges.

In addition to Joseph Doe's separation from his family, two Iraqi men who served as interpreters for the U.S. Army are in "extreme danger" because of their work. An Iraqi woman was kidnapped, raped and threatened with death for her work with an American company. And a transgender woman in Egypt faces harassment and persecution.

They all were in the process of coming to the U.S. when the executive order went into effect.

In issuing the injunction, Judge Robart said the administration violated federal law by taking action and banning refugees from certain countries without going through the proper process.

He also said the administration violated the Immigration and Nationality Act, passed by Congress.

By using language in the act that mandated certain action, "Congress created an entitlement for spouses and children of principal refugees to 'the same refugee status' as the principal refugee_assuming the spouse and children are otherwise admissible," Robart said. "Nothing in the statute authorizes the Secretary to stop, terminate, or suspend the ability of otherwise qualified applicants from seeking and obtaining that entitlement."

Robart said he agrees that the government has a compelling interest in national security, but said the government failed to "point to any specific national security threat that the agency memo curtails," while former national security officials have said they're unaware of any threat that would justify the ban.

"In fact, the former officials detailed concretely how the agency memo will harm the United States' national security and foreign policy interests," Robart said.

Department of Justice lawyers are reviewing the ruling and are evaluating the next steps, while Joseph Doe goes back to the process of reuniting with his loved ones.

"I am very happy that the judge recognized my right to have my family join me here in the United States, and I hope that they can come here as soon as possible," he said.

__

Follow Martha Bellisle at https://twitter.com/marthabellisle