Lawyers for illegal immigrants who were separated from their spouses and families while they sought to become legal U.S. residents through marriage are due in U.S. District Court in Boston on Monday to argue that the government lays deportation “traps” for people who are trying to become legal residents.

“The government created this particular path to lawful immigration status, and then arrested people for following that path,” said Matthew Segal, legal director of the American Civil Liberties Union in Massachusetts. “These were coordinated arrests, and the marriage interviews that our clients had to go through were set-ups.”

Documents released this week in a class-action lawsuit filed by the ACLU include emails between Immigration and Customs Enforcement officials describing how they coordinate arrests with U.S. Citizenship and Immigration Services in New England.

Andrew Graham, a Boston-based ICE officer, said the agency typically receives from USCIS lists of immigrants seeking legal residency who have already been ordered to be deported, had re-entered the country illegally or were considered “an egregious criminal alien.”

The two agencies then schedule interviews with the immigrants so that ICE agents can be present to make an arrest, Graham said, adding that ICE prefers to spread out the interviews, partly to avoid “negative media interest” in the arrests.

The lawsuit, however, argues that Homeland Security regulations crafted under former President Barack Obama permit immigrants with U.S.-citizen spouses to remain in the country while they apply for a green card — even if they’re already subject to deportation.

In a statement yesterday, USCIS spokesman Michael Bars said: “In general … when USCIS officers encounter an individual with an outstanding administrative or criminal … warrant or removal order, they will notify the appropriate law enforcement agency but has (sic) no role in issuing warrants or removal orders. The originating law enforcement agency has the discretion to decide whether they intend to apprehend the individual or not. USCIS is committed to adjudicating all petitions, applications and requests fairly, efficiently and effectively on a case-by-case basis to determine if they meet all standards required under applicable law, policies and regulations.”

ICE spokesman John Mohan called allegations of any inappropriate coordination between ICE and USCIS “unfounded.”

“This routine coordination within the Department of Homeland Security, not unlike the cooperative efforts we maintain with many other federal partners, is lawful and legitimate in the work we do to uphold our nation’s immigration laws, and we look forward to continuing to maintain this critical working relationship with our valued federal partner agency,” Mohan said.

A Department of Homeland Security spokeswoman said the agency does not comment on pending litigation. Spokesmen for President Trump and Suffolk Sheriff Steven W. Tompkins, who also are named as defendants in the lawsuit, did not respond to requests for comment.