A federal judge in Boston is considering the release of three people being held by U.S. Immigration and Customs Enforcement after determining they were not interviewed as required by regulation.

Judge Mark Wolf of the U.S. District Court of Massachusetts had harsh words for ICE’s treatment of the detainees during Friday's hearing. The three individuals, all married to Americans, were arrested as they tried establish legal residency.

Michael Bernacke, An ICE official from Washington in charge of making sure the agency follows regulations nationwide, admitted on the stand that he had not been aware that some detainees must be interviewed in person before ICE decides whether to keep them locked up.

That did not sit well with Wolf.

He “has violated the law every time he detained somebody … because he didn’t know about the requirement for an interview,” Wolf said. “I just can’t let that go.”

Regulations require ICE to interview detainees once they’ve been held for 180 days and are awaiting deportation. The interviews are to determine whether ICE should release the detainees pending deportation. The three detainees in this case were interviewed just recently, not at the six-month point as required.

The Justice Department insists ICE has been following the law.

“ICE has no idea of its legal obligations,” Wolf said. “The government behaves illegally. The results are injustice.”

The day included moving testimony from two of the detainees and their wives.

Elton Moniz, 25, came to the United States from Cape Verde at the age of 5. He lives in Brockton with his American wife, Taylor Moniz. The two were married in 2018.

He's been behind bars since 2015, when he pleaded guilty to assault with intent to murder.

Moniz testified Friday that he had been fighting with someone who had a gun, wrested it from him, fired in the air, fled by car and was pursued by others who fired into his car. At that point, he said, he returned fire.

Moniz was sentenced to four years in prison. Once he was released, ICE picked him up for deportation. His wife, Taylor, testified that she cannot afford a permanent home for herself and their 5-year-old son.

Romilson Ferreira, 33, emigrated from Brazil to the United States in 2004 by crossing the border with Mexico.

He and his wife, Rachel, who would prefer that only her first name be used to protect their children, were married in 2017.

They live on Cape Cod. Rachel has asked that WBUR not reveal in which town, again to protect their children.

Ferreira testified Friday that he was arrested after he called the police because he was hallucinating. He said he resisted when a police officer tried to wrestle him to the ground. He was convicted of assault and battery on a police officer and sentenced to three months, but was released after 19 days at Bridgewater State Hospital. He was subsequently turned over to ICE.

In all, he testified that he had been behind bars for 18 months.

His wife testified that the father of her children killed himself, and that Ferreira had been a good male role model for them, helping them work out the trauma of losing a parent to suicide.

Rachel said that although her husband may not be able to work legally if he's released, he could take care of their children while she works and attends medical appointments she has delayed during his detention.

“We got to hear some really powerful testimony from some families who have been separated by ICE and who really want to get back together,” said Matt Siegel, legal director of the American Civil Liberties Union of Massachusetts, which is representing the families in a class action suit.

Towards the end Friday’s hearing, Wolf told Mary Larakers, the lead attorney for the Justice Department, which is defending ICE: “You’re supposed to be the ‘Justice’ Department,” using air quotes when saying the word Justice.