[Would you pass the green card marriage interview? Take the test.]

After the wedding, all the things they could not do while he lacked legal status became obvious: Not being able to go on their honeymoon, because he could not fly. Not being able to get a joint credit card. Not being able to get car insurance.

“He got caught because he was trying to do the right thing,” Ms. de Oliveira said of her husband’s arrest on Jan. 9. “It was like a setup.”

It took a month for her husband to be released. Because she did not know what else to say when their son asked, Ms. de Oliveira told him that his father was working out of town.

Like many of the immigrants detained this way, Mr. de Oliveira, a house painter, had no criminal history. To the Trump administration, the other thing they had in common was more germane: a legal but, until now, unenforced obligation to leave the country that had stuck to them for years, even as they pieced together lives and families in the United States.

In the later years of the Obama administration, the government mostly left people without criminal records alone, focusing instead on immigrants who had only recently arrived or had been convicted of serious crimes.

But the Trump administration emphasizes that everyone living here illegally is fair game for deportation, a policy that has bumped up immigration arrests by more than 40 percent since the beginning of 2017. Those who were ordered out of the country years ago are especially easy marks for an agency with limited resources for enforcement — especially if they walk straight into an immigration office.

ICE agents who once allowed many unauthorized immigrants to stay in the country as long as they checked in regularly have, over the past year, begun arresting many of those same immigrants at their once-routine ICE appointments. Unlike people who have had no prior contact with the immigration system, those who have already received orders of deportation have few, if any, protections against swift deportation.