(CNN) He flouted the Constitution. He disobeyed court orders. And then he bragged about it.

To understand the building outrage, particularly among civil rights groups, over the possibility that President Donald Trump would pardon former Maricopa County Sheriff Joe Arpaio, one need only return to the July criminal contempt decision against him.

It followed a decade-long case against the sheriff for racial-profiling practices in Arizona, during which Arpaio was ordered to stop targeting Latinos for traffic stops and detention.

"Not only did (Arpaio) abdicate responsibility, he announced to the world and to his subordinates that he was going to continue business as usual no matter who said otherwise," wrote US District Judge Susan Bolton in the July 31 order finding Arpaio guilty of criminal contempt.

The 85-year-old sheriff who lost his run for a seventh term in 2016 is scheduled to be sentenced October 5. Trump has strongly suggested he would pardon Arpaio before then, and CNN has learned that the White House was preparing the necessary paperwork and talking points to distribute to allies.

"Do the people in this room like Sheriff Joe?" Trump asked the crowd at a Phoenix rally Tuesday night. To applause, Trump said, "So was Sheriff Joe convicted for doing his job? ... I'll make a prediction: I think he's going to be just fine."

Maricopa County Sheriff Joe Arpaio takes the stage to introduce Republican Presidential candidate Donald Trump at a political rally at the Phoenix Convention Center on July 11, 2015 in Phoenix, Arizona.

Yet it is plain that Arpaio was not convicted for doing his job. He was convicted for willfully disobeying the law after a court ordered him to stop singling out drivers based on ethnicity and detaining them without charges. Arpaio, who first took office in 1993, rose to national prominence for his crackdown on illegal immigration, earning the nickname "America's toughest sheriff" along the way.

He cultivated that reputation, and as Bolton's order makes clear, he was not going to let anyone tell him what to do.

Bolton's decision arose from a finding of civil contempt by US District Court Judge G. Murray Snow in the racial-profiling case of Melendres v. Arpaio, first filed in 2007. Beginning in 2011, Snow ordered Arpaio to stop detaining people based simply on a belief that they were in the country illegally, rather than suspicion that a crime has been committed.

Arpaio refused to comply, even though Maricopa County lawyers warned him about the magnitude of Snow's order and advised him not to pick up people unless grounds existed for state charges.

After the first order in 2011, Arpaio told various television reporters that he would "never give in to control by the federal government," that he would not "back down" and "if they don't like what I'm doing get the laws changed in Washington."

Bolton said that Arpaio and others in his department continued to round up people and try to turn them over to federal officials.

In 2013, as the racial profiling lawsuit was being resolved, Snow issued a permanent injunction preventing the sheriff's office from "detaining, holding, or arresting Latino occupants of vehicles in Maricopa County based on a reasonable belief, without more, that such persons were in country without authorization."

The order made clear that the sheriff lacked the authority to try to pursue immigration violations, and that Arpaio and his deputies would be violating the constitutional protections against unreasonable searches and seizures if they held people who were not suspected of committing state crimes.

Maricopa County Sheriff Joe Arpaio delivers a speech on the fourth day of the Republican National Convention on July 21, 2016 at the Quicken Loans Arena in Cleveland, Ohio.

Arpaio argued that he had authority to try to work with federal agencies to find immigration violations. Without agreeing with the premise, Bolton wrote that even if that were true, once Snow issued his first order in 2011 -- blocking the sheriff from picking up people for whom no criminal charges existed -- Arpaio was on notice that his practices violated Fourth Amendment rights and he had to stop the practice.

None of the warnings mattered to him, Bolton concluded, noting that Arpaio "stated on numerous occasions that he would continue to keep doing what he had been doing."

One of the possible Trump administration "talking points" for an Arpaio pardon, CNN has learned, is that he served the country for 50 years, from his days in the military to his time as Maricopa County sheriff and should not be sentenced for "enforcing the law" and "working to keep people safe."

Such a pardon, contends Vanita Gupta, president of the Leadership Conference on Civil and Human Rights, would excuse "racist and illegal policing."

Gupta, a former head of the Justice Department's civil rights division in the Obama administration, said in a statement, "If President Trump uses his power to pardon a discredited law enforcement official who persistently engaged in racial profiling of the Latino community, it will not be a dog whistle to the so-called 'alt right' and white supremacists, but a bullhorn."