The pews of Multnomah County’s “community court” were full last month.

Defendants came and went—pleading to small misdemeanors, turning in paperwork proving they’d completed community service. A few never showed at all.

It was a typical day, in other words, until court officials called the name of a middle-aged man accused of petty shoplifting, and promptly altered the normal procedure.

For hundreds of defendants every month, the community court model works in a uniform way: Defendants plead guilty to whatever minor misdemeanor they’ve been charged with, and prosecutors then agree to reduce the crime to a violation, akin to a traffic ticket.

Not in this man’s case.

“Your honor, the state moves to reduce this to a violation right now,” an assistant prosecutor told the judge before the man had pleaded to anything.

“The reason we’re doing this is for immigration consequences,” his public defender chimed in.

It’s a minor tweak that carries huge ramifications. For several years, the Mercury has learned, the community court has had a quiet practice of not forcing people with tenuous immigration situations to plead to misdemeanors, which could earn them extra scrutiny from federal officers.

The defendant in question, whom the Mercury isn’t naming, was born in Latin America, in a region now ravaged by violence from drug cartels, but records show he’s been in the Portland area for at least half his life. He and his wife of two decades, a US citizen, have children together.

The judge, approving the atypical agreement between the defense and state that allowed the man to plead to a non-criminal violation, reminded him: “You have too much at stake” to not follow through with required community service. He wished him luck.

There’s no telling how many defendants have been helped under this policy, but what does seem clear is that under the administration of Donald Trump it has less power to shield immigrants from severe consequences.

The Obama administration was awful for many undocumented immigrants, but at least it was clear who was at risk, and law enforcement agencies could use discretion, attorneys tell the Mercury. Trump, on the other hand, has thrown immigrants into fearful chaos, with ICE agents seemingly plucking folks at random and pursuing a far wider range of people.

Regardless of the administration in power, a criminal conviction can doom an undocumented immigrant’s chances of staying in the country. So there’s been a longstanding, though unwritten, agreement in community court among defense attorneys, prosecutors, and judges to allow non-citizens to avoid misdemeanor pleas that would make them more likely targets of deportation. This arrangement is also considered for citizens who may lose their housing, occupational licensing, or some other unintended “collateral” damage for their low-level charge, though it’s most common in an immigration context.

The Mercury, after discovering the procedure, is only writing about it after assurances from the district attorney’s office this story won’t hinder the arrangement in the future. A public defender and immigrant advocate who often represents Spanish-speaking clients also said this story wouldn’t harm non-citizens.

“I think the courts are going to do what they can to not allow collateral consequences that eat up people,” says Edward Jones, Multnomah County’s chief criminal judge “That’s much more fraught with difficulties in this immigration area than it is, say, with your nursing license or things like that, but it’s all the same set of issues.”

From a prosecutor’s perspective, according to Multnomah County Chief Deputy District Attorney Kirsten Snowden, the disparate treatment doesn’t amount to any meaningful difference in the conclusion of the case.

“There’s nothing different about the sanction, the outcome is just the same,” Snowden says. “It’s a procedural difference in order to accommodate their exceptional needs.”

In community court, when people plead guilty to an array of low-level crimes, the state reduces those crimes to a violation, and the defendant is sentenced to either a set amount of community service hours or told to complete drug treatment or other social services. When those requirements are completed, the cases are usually dismissed entirely. If they aren’t completed in time, a defendant goes to jail for five days. Under normal circumstances, a person’s life isn’t much worse off after going through the process.

But federal immigration courts don’t care if misdemeanor charges are later dismissed. They only care that a non-citizen pleaded guilty to the crime in the first place, immigration attorney Eileen Sterlock says.

“Even though someone may come back and have their record expunged, or charges reduced, or taken off their record altogether for state law purposes,” Sterlock explained, “for (federal) immigration purposes, the general rule is once it’s done, it’s there forever and you can’t really take it away. For immigration law, it’s still there regardless of if you completed a program.”

County prosecutors used to allow people—citizens and non-citizens alike—to plead directly to violations in community court, but that policy changed due to a number of arrests during the Occupy Portland movement. The Oregon Supreme Court, in two cases stemming from the 2011 protests, ruled that those charged with violations are entitled to jury trials.

Taking violations to trial is a waste of time and resources for the state, prosecutors say, so they changed policy to better induce guilty pleas and avoid that outcome. Defendants now have to plead to the misdemeanor for the charge to be reduced. Without that plea, they’d face trial on misdemeanor charges.

The procedural change might have made sense for efficiency, but it was awful news for vulnerable immigrants.

“What we found was that for some folks, this created a disproportionate impact on them that we weren’t really foreseeing, and frequently that’s with folks who are facing immigration consequences,” Snowden says. “But it can also be other people who perhaps would lose their job if they were to plead guilty to a crime even if it were immediately reduced to a violation.”

So the unwritten agreement has quietly shaped up over the past several years.

“If I can take care of you without having to create the paperwork, I have improved your chances of not being deported,” Judge Jones says. “It’s a situation where if we can get our needs met with less paperwork and, therefore, less risk for the guy from an immigration perspective, then why wouldn’t we do that?”

The policy worked fine under Obama, but Trump’s rise to power has thrown everything into flux. With immigration officials casting an ever-wider net, it’s unclear just how much this informal agreement can protect undocumented Portlanders. In Trump’s first three months, immigration arrests skyrocketed by 38 percent compared to the same timeframe last year.

“The rapid increase in arrests was primarily the result of one of Mr. Trump’s first significant immigration moves rescinding rules laid down by former President Barack Obama that prioritized the arrest of the most serious criminals and largely left other undocumented immigrants alone,” the New York Times reported last month. “More than half of the increase in arrests were of immigrants who had committed no crime other than being in the country without permission.”

Judge Jones, referencing the longstanding arrangement in Multnomah County’s community court, says the district attorneys around the nation are now trying more to minimize harm to non-citizens facing low charges.

“There’s now a bunch of stuff going on in prosecutors’ offices across the country where this exact issue is being worked on by state prosecutors,” he says, “to try to formulate ways that are going to lower the profile of people going through the system with minor stuff.”