PHOENIX – A federal judge ruled Friday that the office of America’s self-proclaimed toughest sheriff systematically singled out Latinos in its trademark immigration patrols, marking the first finding by a court that the agency racially profiles people.

The 142-page decision by U.S. District Judge Murray Snow in Phoenix backs up allegations that Maricopa County Sheriff Joe Arpaio’s critics have made for years that his officers rely on race in their immigration enforcement.

Snow, whose ruling came more than eight months after a seven-day non-jury trial on the subject, also ruled Arpaio’s deputies unreasonably prolonged the detentions of people who were pulled over.

“For too long the sheriff has been victimizing the people he’s meant to serve with his discriminatory policy,” said Cecillia D. Wang, director of the ACLU Immigrants’ Right Project.

Stanley Young, the lead lawyer who argued the case against Arpaio, said Snow set a hearing for June 14 on how to make sure the orders in the ruling are carried out.

A small group of Latinos alleged in their lawsuit that Arpaio’s deputies pulled over some vehicles only to make immigration status checks. The group asked Snow to issue injunctions barring the sheriff’s office from discriminatory policing and the judge ruled that more remedies could be ordered in the future.

The group also accused the sheriff of ordering some immigration patrols not based on reports of crime but rather on letters and emails from Arizonans who complained about people with dark skin congregating in an area or speaking Spanish. The attorneys pointed out that Arpaio sent thank-you notes to people who complained.