A federal judge has refused former Arizona Sheriff Joe Arpaio's request to erase a criminal contempt conviction, even after President Trump granted "America's Toughest Sheriff" a pardon which absolved him of any punishment.

"To vacate all rulings in this case would run afoul of this important distinction," U.S. District Judge Susan Bolton wrote in her ruling Thursday. "The Court found Defendant guilty of criminal contempt. The President issued the pardon. Defendant accepted. The pardon undoubtedly spared Defendant from any punishment that might otherwise have been imposed. It did not, however, 'revise the historical facts' of this case."

Arpaio's lawyers and prosecutors from the Justice Department sought to clear Arpaio's name, as the conviction could possibly be used against him in future court cases.

Bolton is the same judge who found Arpaio in criminal contempt of court in July for not following a different judge's orders to stop traffic patrols targeting illegal immigrants.

However, before Arpaio was sentenced, Trump granted a him a presidential pardon in August. The 85-year-old former sheriff of Maricopa County, Ariz., had faced up to six months in jail.

Arpaio's legal team filed an appeal Thursday evening, which will bring the case before the 9th Circuit Court of Appeals.

The ruling came on the same day Arpaio appeared at an event in California, speaking out in support of Omar Navarro, the Republican candidate campaigning to defeat Rep. Maxine Water, D-Calif., a vocal critique of Trump who has repeatedly called for his impeachment. The event took place at Trump's golf club in Rancho Palos Verdes.