A federal judge dealt a new setback Friday to the immigration enforcement efforts of America’s self-proclaimed “toughest sheriff,” barring his deputies from detaining people based solely on the suspicion that they’re in the country illegally.

The ruling sets the stage for a potential trial in a lawsuit that alleges racial profiling in the patrols in Maricopa County, Ariz., and would further limit immigration authority after Washington yanked his federal powers this month.

Lawyers pushing the lawsuit on behalf of five Latino clients also won class-action status that lets other Hispanics join the case if they have been detained and questioned by Arpaio’s deputies as either a driver or passenger in a vehicle since January 2007.