They were known as Miller’s Boys, police officers who worked the 4-to-midnight shift, patrolling the largely working-class town of East Haven, Conn., including the small but growing Hispanic community that has spread out in recent years from New Haven.

The officers were more than well known in that community; according to residents and federal authorities, they were feared. They stopped and detained people, particularly immigrants, without reason, federal prosecutors said, sometimes slapping, hitting or kicking them when they were handcuffed, and once smashing a man’s head into a wall. They followed and arrested residents, including a local priest, who tried to document their behavior.

They rooted through stores looking for damning security videotapes of how they had treated some of their targets, described by one of them on a police radio as having “drifted to this country on rafts made of chicken wings.”

And after it became known that the Justice Department was investigating the department, according to an indictment unsealed on Tuesday, a picture of a rat appeared on a police union bulletin board, and in the locker room, an ominous note: “You know what we do with snitches?”