Former Penn State University president Graham Spanier was set to begin a jail sentence for his conviction on misdemeanor child-endangerment charges on Wednesday. Then a federal judge intervened.

The AP reports that U.S. Magistrate Judge Karoline Mehalchick threw out Spanier’s conviction while giving prosecutors three months to retry him under a version of the state’s child-endangerment law that was in place during the time of Spanier’s alleged actions.

Mehalchick reportedly agreed with Spanier’s defense that he had been improperly charged under a 2007 version of the law, when the conduct for which he was charged took place in 2001. Lawyers for Spanier said that the way the case was tried violated state and federal prohibitions on retroactive application of criminal law.

Prosecutors disagreed, arguing that the version of the law on the books in 2001 criminalized the same conduct.

Spanier was convicted in connection to the Jerry Sandusky scandal for how he responded when a former PSU graduate assistant coach reported seeing Sandusky abusing a boy in a team shower. Spanier and two of his top aides — ex-athletic director Tim Curley and ex-university vice president Gary Schultz — notified a charity organization connected with Sandusky, but did not notify police.

At trial, Spanier chose not to testify, but expressed remorse for not reacting more forcefully at his sentencing.

A spokesperson for the state attorney general said that the decision to overturn the conviction was under review.

Jason Scott is Online Managing Editor of Athletic Business.