A federal appeals court will name a special prosecutor to argue that the guilty verdict against former Maricopa County, Ariz., Sheriff Joe Arpaio should remain on the books despite President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE's pardon.

BuzzFeed News reported the U.S. Court of Appeals for the 9th Circuit ruled Tuesday that, since the Justice Department won't defend Arpaio's conviction for contempt, a special prosecutor is needed.

Arpaio, an ally of Trump's who is running for the Senate seat being vacated by Jeff Flake Jeffrey (Jeff) Lane FlakeJeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Republican former Michigan governor says he's voting for Biden Maybe they just don't like cowboys: The president is successful, some just don't like his style MORE (R-Ariz.), reportedly said the appointment is "totally improper" and represents an "accusatory role" for the court.

ADVERTISEMENT

Arpaio had been accused of racially profiling Latinos in his hard-line immigration enforcement as sheriff. He was convicted of criminal contempt for disobeying a federal judge's order regarding detaining people suspected of being in the U.S. illegally.

Trump in August of last year pardoned the controversial former sheriff, his first pardon as president. At the time, Trump called Arpaio an "American patriot" and said he "kept Arizona safe."

In October, U.S. District Judge Susan Bolton issued an order shutting down requests by the former sheriff's attorneys to have the facts behind the conviction thrown out after the pardon.

Bolton said in the order that Trump's pardon was an "executive prerogative of mercy, not of judicial recordkeeping."

"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," Bolton wrote.

In December, the Justice Department told the 9th Circuit it would "represent the government's interests" on appeal — and that it would not defend the judge's order.

Legal advocacy groups argued that the 9th Circuit should name a lawyer to defend the judge's order. The groups said in a friend-of-court brief that the court should get "the full advantage of the adversarial process."

In its 2-1 ruling on Tuesday, the 9th Circuit agreed.

Arpaio faces a rough GOP primary in the race to replace Flake, facing off against Rep. Martha McSally Martha Elizabeth McSallyTumultuous court battle upends fight for Senate Grassley, Ernst pledge to 'evaluate' Trump's Supreme Court nominee The Hill's Campaign Report: Biden goes on offense MORE and former state Sen. Kelli Ward. The Republican nominee is likely to face Democratic Rep. Kyrsten Sinema in November's general election.