The Colorado Court of Appeals has thrown out election denier Tina Peters’ nine-year prison sentence, finding that the lower court violated her First Amendment right to free speech related to her allegations of election fraud.

“The trial court’s comments about Peters’s belief in the existence of 2020 election fraud went beyond relevant considerations for her sentencing,” a three-judge panel wrote in a 77-page opinion. “Her offense was not her belief, however misguided the trial court deemed it to be, in the existence of such election fraud; it was her deceitful actions in her attempt to gather evidence of such fraud. Indeed, under these circumstances, just as her purported beliefs underlying her motive for her actions were not relevant to her defense, the trial court should not have considered those beliefs relevant when imposing sentence.”

The judges wrote that it was “apparent” the lower court imposed the sentence it did because Tina Peters continued to espouse election denying views.

“The tenor of the court’s comments makes clear that it felt the sentence length was necessary, at least in part, to prevent her from continuing to espouse views the court deemed ‘damaging.’

“But the court failed to acknowledge that Peters is no longer the Mesa County Clerk and Recorder,” they continued. “She is no longer in a position to engage in the conduct that led to her conviction. So it cannot be said that the lengthy prison sentence was for specific deterrence. To the contrary, the sentence punished Peters for her persistence in espousing her beliefs regarding the integrity of the 2020 election.”

The state appeals court is asking the trial court to resentence Peters.

NBC News has reached out to Peters’ attorney for comment.

In a statement today, Colorado Attorney General Phil Weiser called the sentence imposed on Peters “fair and appropriate.”

“Ms. Peters is in prison because of her own criminal conduct to prove false claims of voter fraud in the 2020 elections, and she has not shown any remorse for her actions,” Weiser said.

“Whatever happens with her sentence, Tina Peters will always be a convicted felon who violated her duty as Mesa County clerk, put other lives at risk, and threatened our democracy,” he said. “Nothing will remove that stain.”

President Donald Trump, as recently as March 18, called for Tina Peters to be “free.