The Ninth Circuit Court of Appeals issued a decision clarifying limits on when federal prosecutors can charge immigrants with illegal entry and reentry into the United States this week. Under this decision, it will be more difficult for the government to criminally charge immigrants who attempt to enter the United States outside a port of entry in order seek asylum. Hundreds of prior convictions are also now potentially invalid.

The Trump administration has prioritized the criminal prosecution of migrants who cross the U.S.-Mexico border without inspection – most infamously, as part of its “zero tolerance” policy, where the administration used the criminal prosecution of parents as justification for separating those parents from their children.

As the administration has increased illegal entry prosecutions, it has simultaneously created new barriers for asylum-seekers attempting to lawfully enter the U.S., including turning migrants back from ports of entry and requiring asylum applicants to wait in Mexico while immigration judges consider their asylum applications.

The misdemeanor law criminalizing illegal entry, often referred to as Section 1325, covers three separate types of conduct: (1) entering or attempting to enter outside an official port of entry; (2) “eluding” inspection by immigration officers; and (3) entering through fraud. Federal prosecutors were charging migrants with “eluding” inspection – the second prong of Section 1325—in cases where the arrest took place far from a port of entry. The Ninth Circuit Court said prosecutors were wrong – that they can only charge a person with eluding inspection if they were arrested at or near a port of entry. Migrants who cross the border outside of a port of entry must be charged under the first prong of Section 1325 – otherwise, the first prong doesn’t serve any purpose.

This decision is significant because the law limits who can be charged under the first prong of Section 1325 for entering or attempting to enter outside a port of entry. To illegally “enter” the U.S. a person must cross the border and avoid detection by immigration authorities. A migrant who crosses the border and immediately turns herself over to immigration authorities in order to apply for asylum hasn’t unlawfully entered the U.S.

The Ninth Circuit decision means that many migrants, including parents separated from their children under the “zero tolerance” policy, were unlawfully charged with and convicted of eluding inspection. It further calls into question the government’s widespread practice of prosecuting those who seek refuge in this country, and brings the United States closer to compliance with its international obligations, which forbid prosecuting asylum seekers. No person fleeing violence in their home country should be criminally prosecuted for exercising their right to seek asylum.