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 ruling marks a thorough repudiation of the immigration patrols that have made Joe Arpaio, the sheriff of Maricopa County in Arizona, a national political figure. It backs up allegations that critics have made for years that Arpaio's officers violate the constitutional rights of Latinos by relying on race in their immigration enforcement.

Known for jailing inmates in tents and making prisoners wear pink underwear, Arpaio started doing immigration enforcement in 2006 Arizona voters grew frustrated with the state's role as the nation's busiest illegal entryway.

U.S. District Judge Murray Snow also ruled Arpaio's deputies unreasonably prolonged the detentions of people who were pulled over.

The ruling represents a victory for those who pushed the lawsuit. They weren't seeking money damages but rather a declaration that Arpaio's office engages in racial profiling and an order that requires it to make policy changes.

"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 American Civil Liberties Union's Immigrants' Right Project.

The sheriff, who has repeatedly denied the allegations, won't face jail time or fines as a result of the ruling.

Arpaio, who turns 81 next month, was elected in November to his sixth consecutive term as sheriff in Arizona's most populous county.

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.

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

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 group's attorneys pointed out that Arpaio sent thank-you notes to some people who wrote the complaints.

The sheriff said his deputies only stop people when they think a crime has been committed and that he wasn't the person who picked the location of the patrols. His lawyers also said there was nothing wrong with the thank-you notes.

A spokesman for Arpaio deferred requests for all comment to the lead attorney in the case, Tim Casey, who declined comment until reading the judge's full decision.

The ruling used Arpaio's own words in interviews, news conferences and press releases against him as he trumpeted his efforts in cracking down on immigrants. When it came to making traffic stops, Arpaio said in 2007 that deputies are not bound by state laws in finding a reason to stop immigrants.

"Ours is an operation, whether it's the state law or the federal, to go after illegals, not the crime first, that they happen to be illegals," the ruling quoted Arpaio as saying. "My program, my philosophy is a pure program. You go after illegals. I'm not afraid to say that. And you go after them and you lock them up."