Editor's note: This story has been updated throughout.

The Texas Court of Criminal Appeals on Wednesday potentially imperiled the long-delayed criminal prosecution of Texas Attorney General Ken Paxton, ruling that payments to special prosecutors were outside legal limits.

If they cannot get paid, the prosecutors have suggested they could withdraw from the case against Paxton, a three-year-long legal saga that has dragged on in fits and starts amid side fights like the dispute over legal fees.

In its opinion Wednesday, the state's highest criminal court said a lower trial court was wrong last year to approve a six-figure payment to the three special prosecutors handling the Paxton case. The prosecutors' invoice was rejected by commissioners in Collin County — Paxton's home county — touching off the legal fight that made its way to the Court of Criminal Appeals.

"Here, the trial court exceeded its authority by issuing an order for payment of fees that is not in accordance with an approved fee schedule containing reasonable fixed rates or minimum and maximum rates," the opinion said.

The Court of Criminal Appeals invalidated the payment and ordered the lower court to re-issue it in accordance with the fee schedule.

"While we are disappointed with the majority's ruling and are exploring all legal options available to us, it does not alter the fact that Ken Paxton remains charged with three serious felony offenses," the prosecutors said in a statement responding to the ruling.

Paxton spokesman Jordan Berry said in a separate statement that "while this was a lawsuit brought by Collin County, Attorney General Paxton is extremely grateful for the court's decision."

The court agreed in December to weigh in on an obstacle to Paxton’s long-running legal drama, a fight over more than a year’s payment for the prosecutors working on the case. A Dallas-based appeals court had blocked those attorneys from payment, a decision the prosecutors said would have a “chilling effect on the ability of trial judges to appoint qualified lawyers … willing to take on the most complicated and serious cases.”

While that fight played out in Austin, Paxton’s criminal case stalled in Harris County. Originally set to begin Dec. 11, his trial was put on hold at the end of 2017.

In summer 2015, a Collin County grand jury indicted Paxton on securities fraud charges, alleging he recruited investors for a company without disclosing he was making a compensation. The charges date back to before he was elected attorney general in 2014.

Paxton has denied all the charges against him, calling them “politically motivated,” and he has maintained support from his Republican base even as the charges proceed. He has been cleared twice of related civil charges brought by the U.S. Securities and Exchange Commission.

Paxton won re-election on Nov. 6, defeating Democrat Justin Nelson for a second term. Days later, Paxton was named chairman of the Republican Attorneys General Association.