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

The judge in the securities fraud case against Texas Attorney General Ken Paxton has ruled that the trial should be moved out of Collin County and delayed.

The ruling to change venue is a major victory for prosecutors, who had argued Paxton and his allies had tainted the jury pool in Collin County, where he lives. Hours after the ruling, Paxton's lawyers asked Judge George Gallagher to reconsider, suggesting the decision had been based on a "misdirection ploy" by the prosecutors.

Gallagher said the trial, initially scheduled for May 1, will now be postponed until a new venue is determined.

The judge on Thursday denied two other motions: to dismiss the case and to delay it until prosecutors can get paid.

Paxton's team, which Gallagher has barred from making statements to the media along with the prosecutors, did not comment on the judge's ruling Thursday. But a former Paxton spokesman, Anthony Holm, put out a statement calling the ruling the "latest in a pattern of injustice against Ken Paxton and his family."

Paxton is accused of misleading investors in a company from before his time as attorney general, a legal saga that began more than a year ago. He recently beat a federal, civil case involving similar allegations, but the state charges remain — and they are more serious, carrying a potential prison sentence of up to 99 years.

Gallagher's ruling on the venue is somewhat surprising. Weeks ago, Gallagher had signaled that he had wanted to at least try to move forward with the case in Collin County, where jury selection had been set to begin in a few weeks.

In court, prosecutors had sought to show collusion among Paxton, his team and his supporters aimed at creating a sympathetic jury pool. Paxton's lawyers had argued they had no ties to the alleged effort and that it wasn't affecting public opinion even if it existed.

The pretrial debate took a turn a Wednesday, when Gallagher said at a hearing that he was "very concerned" about a certain exhibit, apparently submitted by prosectors to build their case for a change of venue. The exhibit was an invitation to a 2013 fundraiser for Paxton's 2014 campaign for attorney general, and Gallagher appeared to be concerned about the list of hosts, which included a number of prominent Collin County officials.

Paxton's lawyers responded to the exhibit in a court filing Thursday, asking Gallagher to "view State's Exhibit 14 for what it is: an invitation to a run of the mill political fundraiser, held over three years ago and long before the Special Prosecutors were appointed." The invitation, Paxton's team added, "provides no support for transferring venue or continuing this case."

But it appears the last-minute filing by Paxton’s lawyers did not sway Gallagher — or came too late. In his ruling — also filed Thursday morning — the judged said the court will “transfer venue to an appropriate adjoining district to be determined at a later date.”

In asking Gallagher to reconsider the ruling, Paxton's lawyers said Gallagher was "mistaken" in his concerns about the 2013 fundraiser. "They are based upon a misdirection ploy by the Special Prosecutors, totally unrelated to whether a jury can be picked in Collin County," Paxton's team wrote.

In denying the motion to dismiss the case, Gallagher rejected the argument by Paxton’s lawyers that the charges should be thrown out due to prosecutorial misconduct. That appeared to be the subject of the first part of the hearing Wednesday, which was closed to the media because it involved discussion of the grand jury process.

The second motion Gallagher denied Thursday involved prosecutors’ bid to put off the trial until they can collect their pay, which was put on hold earlier this year by a Dallas appeals court. A Paxton supporter had filed a lawsuit arguing that Collin County was paying the prosecutors too much.

Read more of our related coverage: