In a harshly worded critique of the country’s best-known sheriff, the Justice Department has accused Joe Arpaio of the Maricopa County Sheriff’s Office of engaging in “unconstitutional policing” by unfairly targeting Latinos for detentions and arrests and retaliating against those who complain.

After an investigation that lasted more than three years, the civil rights division of the Justice Department said in a 22-page report that the sheriff’s office has “a pervasive culture of discriminatory bias against Latinos” that “reaches the highest levels of the agency.” The department interfered with the inquiry, the government said, prompting a lawsuit that eventually led Sheriff Arpaio and his deputies to cooperate.