As Yogi Berra liked to say, it was déjà vu all over again Tuesday, in the ongoing prosecutions against Texas attorney general Ken Paxton. Much as he did in September, when the Texas Senate acquitted him of bribery and corruption charges, the attorney general walked blithely out of a courtroom Tuesday morning largely unscathed.

This time, however, it wasn’t his Republican cronies in the state Senate who let him off, but the lawyers who had been prosecuting him for nearly a decade. With Paxton’s case finally set to come to trial next month, lawyers on both sides suddenly agreed to a pretrial intervention. That arrangement would erase three felony securities-fraud charges, so long as the attorney general stays out of trouble going forward and abides by a few other conditions. Kent Schaffer, one of the prosecutors in the case until recently, told those outraged about the settlement not to worry. “I doubt whether he can go eighteen months without committing a felony,” said Schaffer. “In which case it goes back to square one.”

Square one, in this case, dates back to 2015. That year, Paxton was indicted on two first-degree felony counts alleging that he failed to disclose to potential investors in a McKinney tech startup that he was being paid to sign them up. Paxton also was indicted on a third-degree felony count that he never registered with the state securities board while sending clients to a pal’s investment firm. He pled not guilty to all three charges, then pulled strings as a newly elected attorney general to delay the trial again and again.

But in February, the attorney general’s attempts to exhaust the prosecution finally seemed to be coming to an end. Houston judge Andrea Beall set a trial date for April 15. Anyone with a reserved seat in the peanut gallery saw their hopes dashed Tuesday morning, however, with the news that the case had been settled before trial—and very much in Paxton’s favor.

If he had been found guilty on the first-degree charges, the attorney general could have spent a maximum of 99 years in prison and lost his law license. It could have also precluded him from running against John Cornyn for the Senate, as he has hinted he might do, and possibly from serving as U.S. attorney general should Donald Trump win the presidency. Instead, according to the terms of the settlement, he will have to make restitution totaling $271,000 to one former investor and to the estate of another—an indication of how long the case has dragged on. He also must perform one hundred hours of community service, most likely at a food pantry near his home in the Dallas suburbs. And he must take a refresher course on legal ethics, through which critics might suspect Paxton slept during law school. There was, notably, no guilty plea nor even a plea of no contest. “This case was rubbish,” Philip Hilder, one of Paxton’s attorneys, told me, proud of the outcome. “It’s the same case as it was nine years ago. Mr. Paxton ends this case where he started: innocent.”

The scene of Paxton walking away victorious has become a familiar one. In fact, given the many Paxton legal wrangles, it felt like old home week at the Houston courthouse, what with the scrum of beat reporters and TV cameras, and the nose-in-the-air presence of Mitch Little, one of Paxton’s impeachment lawyers who now is almost certainly heading to the Legislature next year. The inside jokes flowed—“Do not focus on Wice’s bald spot,” the acerbic defense attorney Dan Cogdell quipped to cameramen about the lead prosecutor in the case, special counsel Brian Wice. “He hates that.” All that was lacking was the gloriously radioactive tan sported by defense attorney Tony Buzbee last fall.

Unlike Paxton’s impeachment victory, which was predetermined by the gale-force pressure of the GOP’s far-right base and several million from a handful of Christian nationalist donors, this settlement had all the hallmarks of legal realpolitik. About six weeks ago, Schaffer, a well-known Houston-based criminal defense attorney, went to Cogdell, another well-known criminal defense attorney, with a proposal for settlement. Schaffer, along with Wice, had been appointed by a Collin County judge to prosecute the case in 2015 after the local district attorney, a friend of Paxton’s, recused himself.

Schaffer had long complained of working for free in the State of Texas v. Ken Paxton case. Collin County, thanks at least in part to pressure from Paxton’s wealthy and well-connected allies, had long balked at paying the special prosecutors a normal rate. The matter bounced around the legal system, and eventually, the Texas Court of Criminal Appeals, also stocked with Paxton allies, ruled that Schaffer and Wice were not entitled to the payment they sought. (Both prosecutors told me they hadn’t been paid since 2015.) As Schaffer put it, “In this case the client, the State of Texas, has said, ‘We don’t want to pay you.’ ” That left him, he said, wondering, “How much money am I willing to pay to prosecute the AG?”

Then, too, as he began to reconnect with witnesses from years back, Schaffer said, he found that of those Texans Paxton had allegedly defrauded—and who were still alive at this late date—many were hostile. “They would say, ‘Yeah, okay, that happened, but Ken Paxton is a great guy. If I had known [that he stood to benefit from the investments he urged them to make], I still would have gone through with it.’ ” To Schaffer, the prospect of prosecuting a case that had been weakened by nine years of Paxton’s stalling tactics, and prosecuting it so for little or no compensation, had come to look less and less attractive. He wanted out.

At the same time, Cogdell, cautious about the risks of a jury trial, seemed open to negotiation. There was an obstacle to any proposed settlement, however: Schaffer’s cocounsel, Brian Wice. Wice, unlike his cocounsel, does not try cases in the criminal courts. He is known mostly as a go-to criminal appellate lawyer (among other cases, he successfully represented former House majority leader Tom DeLay in an appeal, reversing a money laundering conviction), a legal analyst on Houston TV, and a prolific dispenser of Borscht Belt jokes and sports analogies. To say that Wice is tightly wound is to say that, well, Jose Altuve is a decent ballplayer. From the time Wice and Schaffer were appointed, Wice assumed the Captain Ahab role, with Paxton starring as his great white whale. Even as the case dragged on, and even as payment to the special prosecutors continued to be withheld, Wice kept faith that he could put Paxton away.

Without talking with Wice, Schaffer made overtures to Cogdell. The deal they came up with included dismissal of the two first-degree felonies and some community service. Restitution was not on the menu, nor was a guilty plea which would mean loss of Paxton’s law license. Wice balked when he got wind of that deal. “To me, that was worse than a slap on the wrist. That was, ‘Gee, let’s get you a cocktail, a hot meal and a breath mint.’ And that wasn’t going to happen on my watch,” Wice told the Texas Tribune after a February hearing on the case. Later, he was even more direct: “I do not and will not agree to pretrial intervention/diversion as a resolution to these matters,” he wrote to both Schaffer and Cogdell on February 15. Soon after, Schaffer departed the case, leaving a bitter rift between himself and his former friend and cocounsel.

Weeks passed. The two sides thought they could, once again, get a continuance on a trial date until September, but now it was Judge Beall’s turn to balk. There would be no more delays. The trial would commence on April 15. By then, Wice had a new partner, Jed Silverman, also based in Houston, who some believe convinced him to see the myriad dangers in losing the case entirely. As his opposition to a settlement softened, Wice began to push for restitution to Paxton’s victims. Cogdell agreed and the two hammered out an agreement.

Almost immediately in the wake of the settlement, Paxton’s critics poured out their fury at Wice and Silverman: “Please commit suicide you piece of s‍—,” wrote one disappointed emailer. But some experienced lawyers say that, because of the near-decade of delay, engineered mostly by the AG, the prosecutors didn’t have much choice.

David Berg, another august member of the Houston Bar, put it this way: “This is the most unusual resolution of a major felony that I’ve ever seen,” he told me. “It must be good to be Ken Paxton. These were serious allegations and the deal that he got allows him to walk away without ever having anything on his record.” But he added that he didn’t blame the prosecutors; Paxton’s victory was a variation on the theme that justice delayed is justice denied. “The longer a criminal case goes on, the more beneficial it is for the defendant. Witnesses die, witnesses are pressured, witnessed don’t want to testify. Deferring justice for nine years is pretty much a fatal shot through the heart of an indictment.”

After the court hearing on Tuesday morning, Wice claimed victory, primarily on the grounds he got justice—restitution—for the original clients. Referring to Paxton, he later added that “You don’t write a check for around $300,000 unless you’ve done something wrong.” Paxton wasn’t buying that, of course. In a statement released Tuesday afternoon, Paxton wrote that “There will never be a conviction in this case nor am I guilty.”

Depite his victory on Tuesday, Paxton’s trials, literal and metaphorical, aren’t over. The former staffers at the Office of the Attorney General who accused Paxton of violating the Whistleblower Act when he fired them are anxiously awaiting their day in court. The State Bar of Texas is suing Paxton for professional misconduct over his attempts to overturn election results in four states in 2020. And the feds are reportedly still on his trail, based on the abundant evidence of corruption presented during his impeachment trial. 

Not that any of this appears to matter to Paxton’s loyalists. Once upon a time, even popular politicians were thought to be accountable to the law. Now, like former president Donald Trump, Paxton has maintained his hold on his party regardless of his misdeeds. “I think Paxton realizes voters don’t care,” Schaffer said. “If he commits a few felonies here and there they are still gonna vote for him.”