TUCSON — “My record is 30 minutes,” Magistrate Judge Bernardo P. Velasco of Federal District Court here said one afternoon, describing the speed with which he had sealed the fates of 70 migrants caught sneaking into the country. Each of the accused had 25 seconds, give or take, to hear the charges against him, enter a plea and receive a sentence.

This is a part of the battle against illegal immigration that many Americans have never heard of. Known as Operation Streamline, it is the core of a federal program that operates in three border states, using prosecution and imprisonment as a front-line deterrent to people who try to cross the border illegally. It is part of a broader strategy of increasing the consequences for people who break immigration laws.

Unlike the civil immigration courts spread throughout the country, where deportation cases are handled as violations of the nation’s administrative code, the courts used for Operation Streamline treat unauthorized immigrants as criminals and the act of illegally crossing the border as a federal crime.

Men and women arrested along the border, the chains around their ankles and wrists jingling as they move, are gathered to answer to the same charges — illegal entry, a misdemeanor, and illegal re-entry, a felony. They have not had an opportunity to bathe since they set off to cross the desert; the courtroom has the smell of sweaty clothes left for days in a plastic bag. Side by side in groups of seven as they face the bench, they consistently plead guilty to a lesser charge, which spares them longer time behind bars. The immigration charge is often their only offense.