The Justice Department on Thursday accused a controversial Arizona sheriff known for tough immigration enforcement of widespread discrimination against Hispanics, saying Sheriff Joe Arpaio’s department illegally detained Hispanic residents and denied them critical services in jail.

That report was followed hours later by a Department of Homeland Security announcement that it was terminating the sheriff’s participation in a federal-state program to enforce immigration laws.

The actions against America’s self-styled “toughest sheriff” highlighted the Obama administration’s increasingly aggressive enforcement of civil rights laws in areas including police brutality and voting rights.

The Justice Department’s Civil Rights Division is conducting 20 probes of police and sheriff departments — the most in its 54-year history. And this week, Attorney General Eric H. Holder Jr. vowed to fully enforce civil rights protections in the run-up to the elections amid Republican-led efforts to tighten state voting laws.

Arpaio is a former D.C. police officer and the longtime sheriff of Maricopa County; he has come to embody the national divide over illegal immigration. In its report, the Justice Department said he had created a “wall of distrust” with Hispanics by targeting them for arrest and retaliating against those who criticized his methods. The sheriff’s deputies, it found, were four to nine times as likely to stop Hispanic drivers as non-Hispanics. Arpaio strongly denied the allegations.

“We found discriminatory policing that was deeply rooted in the culture of the department,’’ said Thomas E. Perez, assistant attorney general for civil rights. He vowed to work with Maricopa, which includes Phoenix, in implementing reforms, but if the sheriff refuses to cooperate, Perez threatened a civil lawsuit or steps to curtail the millions of dollars in federal funding the department has received over the past several years.

A separate criminal investigation of Arpaio’s department is continuing, federal officials said. Sources familiar with that inquiry have said a federal grand jury in Phoenix is examining whether Arpaio used his power to investigate and intimidate political opponents and whether his office misappropriated government money.

The report on the civil rights probe, which began in 2008 and is continuing, could heighten tensions over the bitterly divisive issue of illegal immigration ahead of next year’s presidential election.

Once seen as a quirky figure who made inmates wear pink underwear, Arpaio has in recent years become a kind of folk hero to those who favor his heavily publicized “crime sweeps,” mostly in Hispanic neighborhoods.

Arpaio and his attorneys have long denied any racial profiling and derided the Justice Department investigations as politically motivated. In his typically pugnacious style, the sheriff on Thursday blasted the report as “a sad day for America as a whole.’’

“Don’t come here and use me as the whipping boy for a national and international problem,” he said at a news conference, according to the Associated Press. “We are going to cooperate the best we can. And if they are not happy, I guess they can carry out their threat and go to federal court.’’

The reaction was equally blistering from Arpaio’s supporters, who accused the administration of targeting him for political reasons amid its broader crackdown on new state immigration laws. A different Justice Department division has sued four states over their laws, and the first such suit was filed against Arizona.

“The Justice Department has been turned into an attack dog to sic on anybody who tries to enforce immigration laws,’’ said Ira Mehlman, a spokesman for the Federation for American Immigration Reform, which favors tough immigration enforcement.

Jessica Vaughan, director of policy studies at the Center for Immigration Studies, said the administration “has been gunning for Arpaio for a long time. . . . His efforts on immigration law enforcement help keep everybody in this country safer.’’

Civil rights groups and other administration allies applauded the Justice Department. “After nearly 20 years in office, Sheriff Joe Arpaio’s reign of terror against immigrants in Maricopa County, Arizona, is on its last legs,’’ said Angela M. Kelley, vice president for immigration policy and advocacy at the Center for American Progress Action Fund.

Homeland Security Secretary Janet Napolitano, saying she was “troubled” by the findings of the Justice Department report, announced that her department is ending the Maricopa County Sheriff’s Office’s participation in a program that deputizes local police officers to enforce immigration laws and flag illegal immigrants to federal officials.

In the report, Justice said Arpaio’s department has engaged in a “pattern or practice of unconstitutional policing” by unlawfully stopping, detaining and arresting Hispanics. Once in jail, the report said, Hispanics are punished if they fail to understand commands in English and denied access to basic services such as new clothes or sheets or information about early-release programs.

The report takes aim at Arpaio’s crime sweeps, saying they have sometimes been initiated because the department received complaints that people with “dark skin” were congregating. It says detention officers hurl racial slurs at Hispanic inmates and that supervisors demean Hispanics in e-mails.

The report also says that the sheriff’s department uses excessive force against Hispanics — including one person deliberately struck with a patrol car and dragged more than 10 feet — and harasses critics with unfounded investigations and arrests. While focusing on immigration enforcement, the report said, the department has failed to investigate hundreds of sex crimes and allowed violent crime to increase.