Updated

A federal judge in Phoenix Wednesday formally dismissed the criminal case against former Maricopa County Sheriff Joe Arpaio, accepting President Donald Trump's pardon of the controversial lawman.

U.S. District Judge Susan Bolton dismissed Arpaio's conviction with prejudice, meaning the matter cannot be tried again. Bolton held off on ruling on Arpaio's request to throw out all orders in the case, including a blistering 14-page ruling in which the judge explained her original reasoning in finding that Arpaio was guilty of a crime.

Arpaio was convicted in July of criminal contempt for what Bolton described as "flagrant disregard" of a 2011 court order to halt traffic patrols that targeted immigrants.

Trump pardoned Arpaio Aug. 25, setting off a firestorm of criticism from legal advocates and congressional Democrats, more than 30 of whom asked Bolton to declare the pardon invalid and move forward with sentencing.

Arpaio attorney Mark Goldman described the attempted intervention by lawmakers as "despicable."

"What are our Democrat congressmen doing?" asked Goldman, who described the lawmakers as "narcissistic idiots ... making a statement where they have no standing to make any statement whatsoever."

The former sheriff, who didn't attend Wednesday's hearing in federal court, was accused of continuing the patrols for 17 months so that he could promote his immigration enforcement efforts in a bid to boost his successful 2012 re-election campaign.

Bolton's ruling cited television interviews and news releases in which the sheriff made comments about keeping up the patrols, even though he knew they were no longer allowed.

Arpaio, who endorsed Trump and appeared alongside him at rallies during the 2016 campaign, has acknowledged prolonging the patrols, but insisted his disobedience wasn't intentional and blamed one of his former attorneys for not adequately explaining the order's importance.

Critics say the pardon removed the last chance at holding Arpaio legally accountable for a long history of misconduct, including a 2013 civil verdict in which Arpaio's officers were found to have racially profiled Latinos in the sheriff's immigration patrols. The order that Arpaio acknowledged violating was issued by U.S. District Murray Snow in the profiling case.

Prosecutor John Keller said it was appropriate to dismiss the case against Arpaio.

"This prosecution is over," Keller said. "The defendant will never be held accountable for his contempt of Judge Snow's injunction."

Bolton has previously said case law suggests a pardon doesn't erase a recipient's underlying record of conviction and instead is aimed at lessening or canceling punishment. The pardon had previously led the judge to cancel Arpaio's sentencing hearing.

Lawyers who won the racial profiling verdict against Arpaio had argued earlier that the decision explaining the guilty verdict should remain intact to serve as a rebuke of the sheriff's actions and as a deterrent to other politicians who might want to disobey a judge's orders.

Since the pardon, Arpaio has said he did nothing wrong, criticized Bolton as biased and called the offense behind his conviction a "petty crime." Arpaio, who was defeated last year in the same election that sent Trump to the White House, is now talking about getting back into politics.

The Associated Press contributed to this report.