In this Aug. 26, 2019, file photo, former Arizona Maricopa County Sheriff Joe Arpaio poses for a portrait after talking about trying to get back the job he lost in 2016 as he announces his 2020 campaign for Maricopa County Sheriff in Fountain Hills, Arizona. (AP Photo/Ross D. Franklin, File)

PHOENIX — A court-appointed investigator concluded that high-ranking managers for former metro Phoenix Sheriff Joe Arpaio disregarded a federal judge’s order for Arpaio to halt immigration sweeps targeting Latinos, according to documents obtained by The Associated Press.

The investigator also found an internal probe was whitewashed to shield the managers from accountability.

The findings come as both Arpaio and a former top manager identified in the investigation are running in the 2020 Republican primary for the job as sheriff of Maricopa County, Arizona’s most populous.

The investigator’s findings cover alleged misconduct in Arpaio’s office from late 2011 through 2016. Arpaio, who became nationally known for his hardline on immigrants in the country illegally, lost his post as in 2016.

Arpaio, who has called himself the toughest U.S. lawman, was convicted of misdemeanor criminal contempt of court for refusing the stop his traffic patrols that targeted immigrants but was pardoned by President Donald Trump, who has praised Arpaio’s 24-year tenure as sheriff and “his life’s work of protecting the public from the scourges of crime and illegal immigration.”

Among sheriff’s officials criticized by the investigator was Jerry Sheridan, who was Arpaio’s second-in command and is running against his old boss in the primary. Sheridan has long contended that he was unaware of the judge’s highly publicized 2011 immigration sweep order while serving as Arpaio’s chief deputy, but the investigator’s report said he was present at a meeting with Arpaio when the order was discussed.

The investigator, Daniel Giaquinto, is a former prosecutor and judge. He was hired by U.S. District Judge Murray Snow to re-examine misconduct investigations by Arpaio’s office after the judge criticized some of the investigations as tainted by biased decision-making that protected some officials.

Giaquinto’s 2017 findings after Arpaio left office were not made public and the Maricopa County Sheriff’s office contended they could not be released until employees named in the report are disciplined — but did so after the First Amendment Clinic at Arizona State University’s law school demanded them on AP’s behalf.

In the documents, Giaquinto harshly criticized the 2015 appointment by Arpaio of sheriff’s Chief Mike Olson to decide whether Sheridan should have been disciplined over the sheriff’s office decision not to enforce the judge’s order halting the immigration sweeps. Sheridan was Olson’s commanding officer and the two were friends, the investigator said in the documents.

“This structural impropriety made what should have been an independent and impartial process appear to be rigged in the department’s favor,” Giaquinto wrote.

Sheridan did not run the sheriff’s unit in charge of the immigration sweeps, but Giaquinto found that Sheridan as Arpaio’s second in command had responsibility to ensure that the judge’s order was obeyed, the documents said.

Giaquinto wrote that “a plethora of evidence in this matter demonstrates that Chief Deputy Sheridan was given notice of the preliminary injunction banning the immigration sweeps shortly after it was issued and remained knowingly indifferent to it.” The investigator also said four other managers, two of them high-ranking, failed to push the department to comply with the judge’s order.

Arpaio and Sheridan questioned whether the release of the investigator’s reports was politically motivated, though some were requested by the AP more than two years ago.

“Why are they coming out with this right now? It’s suspicious, since I’m running for sheriff,” Arpaio said in an interview.

Sheridan called the investigator’s conclusions about him unfair, saying he was focusing on other sheriff’s office priorities, including numerous sex crimes investigations the agency had botched, when the judge’s order on the immigration patrols was issued.

“I don’t like this injustice,” Sheridan said, adding that he would not run for sheriff if he thought he was “damaged goods.”

The sheriff’s office is now run by Democrat Paul Penzone, who beat Arpaio and denied political motivations in his office’s release of Giaquinto’s reports.

In another case that Giaquinto examined, he reversed the results of a sheriff’s office internal investigation into why managers did not properly supervise a deputy sheriff whose arrest revealed that deputies were pocketing items from people during traffic stops, including those targeting illegal immigration, without documenting the seizures and putting those items in storage as evidence.

The deputy sheriff, Ramon Armendariz, in 2014 reported his home had been burglarized and police found him firing a pepper ball gun at an imaginary burglar in his garage. They believed he was either high on drugs or having a manic episode.

Investigators at his house found illegal drugs, hundreds of IDs and license plates, bags of sheriff’s office evidence that had been opened and 4,300 traffic-stop video clips that had been withheld from the racial profiling case that led the judge to halt Arpaio’s immigration patrols.

Armendariz, who was assigned to conducting immigrant patrols, then accused officers on the immigration squad of wrongdoing. Days later, he died in what was ruled a suicide. Other officers who were seen in the videos with Armendariz later found themselves the subject of internal affairs investigations.

Before police made the seizures at his home, Armendariz, had also faced accusations of off-duty domestic violence, stealing $300 from a woman he arrested and using a stun gun on a handcuffed 20-year-old man believed to be intoxicated outside a high school prom dance, according to Giaquinto’s reports.

Olson had made a preliminary finding that four managers failed to properly supervise Armendariz, but he later rescinded those conclusions against all but one manager, who received a 40-hour unpaid suspension. That manager was promoted and received a pay increase while the internal investigation was still underway.

In rescinding his findings, Olson explained it was not fair to discipline managers who had taken steps to transfer Armendariz out of the immigration squad, known as the office’s Human Smuggling Unit, or HSU. But Olson said they were thwarted by Brian Sands, the sheriff’s office executive with oversight over the immigration unit.

Olson said in an interview that any suggestion that the discipline meted out was rigged is false.

“There was no pressure put on me by anyone,” said Olson, who retired in 2017.

Giaquinto rejected the suggestion that only one official was responsible, finding that six supervisors should have held Armendariz accountable, including Sands and the manager who got the raise.

Sands, who retired in mid-2013, said he was unaware of the depth of Armendariz’s disciplinary problems at the time and would have taken serious disciplinary action against if he had been alerted earlier

“It didn’t come to my attention,” he said.

Although Arpaio wasn’t the target of any of the internal investigations, Giaquinto said the entire chain of command at the sheriff’s office — including Arpaio — was to blame for the failure to rein in Armendariz.

Giaquinto wrote that Arpaio “believed that the mission of the HSU — the enforcement of immigration laws — was beneficial to his public stature and re-election efforts.”