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.

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.

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.

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