A federal judge has recommended that Arizona sheriff Joe Arpaio, a leading ally of Republican nominee Donald Trump, face criminal charges of contempt of court for ignoring orders in a racial profiling case that found that he violated Latinos’ civil rights.

District judge Murray Snow wrote in a ruling on Friday that another judge would have the final decision regarding whether to charge Arpaio with contempt for his illegal immigration patrols, which he continued for months after Snow ordered them stopped.

Snow also said there was probable cause to believe that Arpaio intentionally failed to turn over records that he had promised, under oath, to give to the court.

The records were from a secret investigation that Arpaio’s foes say focused on Snow in an attempt to discredit him. The sheriff has vigorously insisted that he didn’t investigate Snow, and that the inquiry was instead about widespread identity theft.

The judge also found there was probable cause to believe Arpaio’s deputy, Jerry Sheridan, and others violated orders in concealing nearly 1,500 IDs in an internal investigation into whether officers pocketed items from people during traffic stops.

“Sheriff Arpaio and Chief Deputy Sheridan have a history of obfuscation and subversion of this Court’s orders that is as old as this case and did not stop after they themselves became the subjects of civil contempt,” Snow wrote.

The order moves the six-term sheriff’s contempt case from civil court to criminal court. Snow will continue to preside over the profiling case as he presses the sheriff’s office to make policy changes to prevent future racial profiling.

Calls to the sheriff’s office and Sheridan’s attorney were not immediately returned Friday evening.

But in a court filing last month, Arpaio attorney Mel McDonald said the sheriff regretted the mistakes that led to the civil contempt violations, and that Arpaio had made significant strides in complying with court-ordered changes imposed on his office.

The case would be prosecuted either by the US attorney’s office or an attorney appointed by the court.

In May, the judge found Arpaio, Sheridan and two other sheriff’s employees in civil contempt of court for violating three orders within the nearly nine-year-old profiling case. Arpaio and Sheridan were previously found to have made several intentional misstatements of facts last year during their contempt hearings.

Three years ago, the sheriff’s office was found to have racially profiled Latinos in regular traffic and immigration patrols. The judge imposed a series of changes aimed at guarding against profiling.

Arpaio, 84, is seeking a seventh term this year and built his political reputation on pushing the bounds of local immigration enforcement, making inmates wear pink underwear, jailing them in tents despite triple-digit summer heat and waging an aggressive campaign against bestiality.

The sheriff has re-emerged as a national figure thanks to his outspoken support for Donald Trump, who has loudly supported Arpaio’s strident anti-immigration philosophy. Arpaio spoke on behalf of Trump at the Republican national convention in July, and the Republican nominee, who has called Mexicans “rapists” and promised a wall on the southern border, often tells rallies: “I love Sheriff Joe.”