HARRISBURG, Pa. (AP) – A federal judge has thrown out former Penn State President Graham Spanier’s child-endangerment conviction, less than a day before he was due to turn himself in to jail.

U.S. Magistrate Judge Karoline Mehalchick in Scranton, Pennsylvania, issued a decision late Tuesday that gave state prosecutors three months to retry Spanier.

READ MORE: Pittsburgh Lifeguard Helps Woman Finish Great Race

She agreed with Spanier’s argument he was improperly charged under a 2007 law for actions that occurred in 2001, when he was responding to a complaint about Jerry Sandusky showering with a boy on campus.

READ MORE: West Virginia Leaders Hopeful That COVID-19 Pandemic Peak Is Waning

Spanier had been due to report to jail early Wednesday to begin serving a minimum sentence of two months.

The 70-year-old Spanier was forced out as president shortly after Sandusky’s 2011 arrest.

MORE NEWS: Pittsburgh Man Who Survived COVID-19 Undergoes Transplant After Virus Resurfaces And Attacks Heart

(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)