(CNN) A federal judge in Boston said Thursday that Immigration and Customs Enforcement shouldn't remove people who are in the process of applying for green cards just because they have final orders of removal.

US District Judge Mark Wolf issued the ruling during a hearing in the case of New England couples -- US citizens who are married to undocumented immigrants -- who say they're being caught in a "trap" by the government to arrest immigrants. The couples argue that the "provisional waiver process," which allows undocumented immigrants to try to obtain citizenship, is being used incorrectly.

Wolf also denied the government's motion to dismiss the case.

"ICE may only remove them from the US after considering the fact that they were pursuing provisional waivers," Wolf said in court Thursday. "I am not precluding ICE from taking action."

Wolf's statement was not a preliminary injunction, which would have been a court order for ICE to stop deporting undocumented immigrants who were going through the waiver process.

It is unclear if the government would face a penalty if it doesn't abide by the ruling, and if this would apply outside the New England area.

Five New England couples are suing Department of Homeland Security Secretary Kirstjen Nielsen, ICE officials, President Donald Trump and Boston-area law enforcement officials after they said multiple spouses with final orders of removal were detained by ICE after sitting down for marriage interviews with their US-citizen spouses at a Boston-area US Citizenship and Immigration Services office. Such interviews are part of the application process to prove their marriages to US citizens are legitimate, enabling them to move toward legal status.

Emails entered as evidence in the case show what appear to be efforts between Citizenship and Immigration Services employees and ICE employees to coordinate the interview appointments and arrests of people appearing for interviews with final orders of deportation. USCIS said that, in general, when its officers encounter someone with outstanding warrants or removal orders, they will notify the appropriate law enforcement agency. DHS did not comment further.

American Civil Liberties Union attorney Matt Segal, who along with attorneys from the firm WilmerHale is representing the five couples named in this suit, said his interpretation of Thursday's ruling is that while it wasn't styled as a court order, "it is a ruling on the law, and our expectation -- and presumably the court's -- is that the government is going to comply with the law as it's now been interpreted by the court."

"So as of the ruling today the law from the court's perspective is that people cannot be targeted for arrest and removal unless there is consideration given to the fact that they're pursuing this provisional waiver process," Segal said Thursday.

CNN asked the Department of Homeland Security, which oversees ICE, if it plans on complying with the ruling and a spokeswoman replied: "As a matter of policy, we don't comment on pending litigation."

Court filings from the ACLU show that about 13 people have been arrested at marriage interviews in the Boston area since January. The ACLU says it is asking other New England residents to contact them if they are not citizens and believe they are being targeted for ICE arrest or removal, despite being in the process of applying to become lawful permanent residents.

The situations the couples face came to light after a Rhode Island woman, Lilian Calderon, 30, was taken into ICE custody in January when she and her husband went to a nearby USCIS office for a marriage interview so she could begin trying to become a lawful permanent resident.

Calderon is a Guatemalan immigrant who was brought to the US when she was 3 years old. She is married to a US citizen, Luis Gordillo, and the couple has two children. She alleges in the case that after her interview was complete, she was "unexpectedly detained by ICE."

Calderon had been subject to a final order of removal since the age of 15, after her father's asylum application was denied. Her Deferred Action for Childhood Arrivals application was also denied in 2017 because, according to the complaint, "she had not provided sufficient evidence of her continuous presence in the United States."

Calderon was held in an ICE detention facility in Boston from January until Feb. 13, after Wolf issued an order prohibiting ICE from deporting her while her lawsuit is pending.

ICE officials testified that they believe the arrest in Calderon's case was justified, per Trump's January 2017 executive order calling for "the faithful execution of immigration laws of the United States ... against all removable aliens."

After Wolf's ruling Thursday, Calderon said, through a spokeswoman, that she and her husband were "delighted" the judge has allowed the case to proceed.

"Luis and I were trying to do what the government asked of us so that our family could continue to be together," Calderon said in the statement to CNN. "This gives us hope that no other family will have to endure what we have."

Both parties are expected to file written status reports on the case to Wolf by Sept. 12.