Immigrants who have been arrested in zero-tolerance zones along the Mexican border must not be tried at mass criminal immigration hearings because the proceedings violate federal rules, an appeals court ruled Wednesday.

A three-judge panel with the 9th U.S. Circuit Court of Appeals in San Francisco ruled that a federal court in Tucson, Arizona — where mass hearings have been held for defendants arrested by U.S. Border Patrol agents — had violated a rule that requires that each defendant be read their rights and be given an explanation of what a guilty plea means.

Any immigrants found in zero-tolerance zones established along the Mexican border under Operation Streamline can be arrested and prosecuted in a federal court on charges of illegal entry.

The program was initially credited with curbing illegal border crossings, but critics have long argued that immigrants are pushed through the system without being given a chance to fairly defend themselves or understanding the proceedings.

Most immigrants scooped up under those circumstances answer "yes" en masse when asked if they understand their rights and the consequences of pleading guilty, according to the ruling posted on the court's Web site. Most are not individually questioned by the judge, it said.