(Texas Tribune) -- A judge has thrown out a federal civil case accusing Attorney General Ken Paxton of securities fraud, giving him his biggest legal victory yet since the allegations surfaced more than a year ago.

“I appreciate the judge’s thorough review and I am gratified by his dismissal of the entire case,” Paxton said in a statement.

U.S. District Judge Amos L. Mazzant III on Friday granted Paxton's motion to dismiss the lawsuit but gave the U.S. Securities and Exchange Commission 14 days to amend its allegations against the attorney general. Paxton is still fighting similar criminal charges at the state level.

“Now, we turn our attention to Ken’s exoneration in the state matter, where the prosecutor’s burden is even higher,” said Bill Mateja, a lawyer on both Paxton’s SEC and criminal defense teams. “The fraud allegations in the SEC case mirror those in the state case.”

Paxton is accused of misleading investors in a company from before he took office as Texas' top lawyer. One of the central allegations is that he persuaded a group of people to invest in the company, a technology startup known as Severgy, without disclosing that he was receiving a commission.

“This case is not about whether Paxton had a moral obligation to disclose his financial arrangement with Servergy to potential investors,” Mazzant wrote in a 29-page ruling. “This case is also not about whether Paxton had some general obligation to disclose his financial arrangement to his investor group.”

Rather, Mazzant concluded, the case is about whether Paxton had a legal obligation to make a disclosure, and he did not — at least according to the facts put forward by the SEC.

Mazzant was skeptical of the SEC's case against Paxton in a hearing last month, at one point suggesting the federal government was trying to fit a "square peg into a round hole." In his opinion Friday, Mazzant wrote that the court "has determined that under the facts pleaded by the [SEC], Paxton did not have a legal obligation to disclose his financial arrangement."

Matthew Martens, Paxton’s lead attorney in the SEC matter, applauded the judge’s decision.

“This is a victory for Ken Paxton,” he said. “Obviously, we are pleased with the Court’s ruling today.”

Paxton’s legal troubles began last summer, when a Collin County grand jury indicted him on criminal charges of securities fraud and failure to register with the state securities board. So far, his lawyers have been unable to get the state case thrown out, and they are currently waiting to see whether Texas’ highest criminal court will agree to review it.

Click here to see this story in its original home with our media partners at The Texas Tribune.