In court Tuesday, federal judge Mark Wolf accused the Department of Homeland Security of breaking its own rules by holding immigrants who are married or engaged to American citizens for extended periods without notifying them of their right to a hearing or notifying their attorneys.
One woman was released Tuesday; two men are hoping to be released Wednesday.
"The Department of Homeland Security violated the law by not following their own regulations," Wolf said.
WBUR first broke the story that ICE was arresting people at their government interviews.
Two of the people in court Tuesday, Lucimar De Souza and Eduardo Junqueira, were arrested in January and February respectively when they showed up for their interviews at U.S. Citizenship and Immigration Services to prove that their marriages, in the words of Wolf, are "not shams."
De Souza, a Brazilian immigrant, lives in Everett, Massachusetts, with her American husband. They have been married since 2006 and have a 10-year-old son.
They married years after she had been ordered removed from the country.
Before 2016, spouses of Americans who had been ordered removed from the country as well as spouses who had entered the country illegally had to return to their country of origin as they waited for recognition of their marriage so that they could obtain legal permanent residence.
In 2016, USCIS regulations were changed to allow these spouses to stay in the country as they awaited permanent resident status.
Junqueira, also a Brazilian immigrant, lives in New Milford, Connecticut, with his American wife and their two sons, who are nine and ten.
He has entered the country illegally on at least two occasions. He has been ordered removed from the country, but his attorneys planned to file a stay of his removal Wednesday.
"You've probably never spent a day in jail, did you?" Wolf asked Department of Justice Attorney Mary Larakers as he noted the length of time De Souza and Junqueira have been detained. "These two people have been locked up for more than three months, separated from their spouses, separated from their children."
"Every day is precious," Wolf added. "They are suffering irreparable harm. Our country honors family values."
Wolf pointed out that USCIS has a policy against arrests at its offices, which puts it at odds with ICE.
"So the court has indicated a lot of interest in why it's doing what it's doing, and why it's made these extremely harsh decisions to detain people who are seeking lawful status," said Adriana Lafaille, the American Civil Liberties Union of Massachusetts attorney for De Souza, after her client was released Tuesday.
Asked if she wanted to comment as she left the court room, Larakers said: "It's not that we don't want to talk. It's that we've been ordered not to talk."
Wolf said he needs time to study the case of the third person in court Tuesday, Edjann Dos Santos, of Fall River, Massachusetts. Attorneys for Dos Santos say Wolf wants to wait until he is married before taking up his case. Dos Santos's future in-laws said Tuesday that if ICE allows it, the wedding could take place as early as Wednesday.
Wolf has scheduled a hearing for next Tuesday to review the cases. He has ordered the Justice Department to produce the ICE agents who arrested the immigrants so that they can explain their actions in court.
Wolf noted that on several occasions, ICE has released immigrants once they appeared in federal court.
"I'm concerned about the people who don't get their cases heard in federal court," Wolf said. "This shouldn't be a game of hide and seek."
Wolf ordered the Justice Department to provide a status report on the cases Wednesday.
This report was originally published by WBUR.