Texas Attorney General Ken Paxton is nearing a resolution to the 9-year-old securities fraud charges that have dogged his tenure as the state’s top attorney through a special agreement with prosecutors, the American-Statesman has learned.

Under a draft agreement, prosecutors would dismiss felony charges against Paxton if he successfully completes the terms of the deal, according to three sources familiar with the negotiations.

The sources, with knowledge of the discussions between Paxton’s legal team and prosecutor Brian Wice, a Houston attorney appointed to handle the case, said the terms could include community service, advanced legal education classes and a six-figure restitution, among other possible punishment. Two sources said the restitution could be between $300,000 and $400,000.