Former DeKalb County School Superintendent Crawford Lewis was released on $5,000 bond Friday night after the Georgia Court of Appeals ordered DeKalb Superior Court to set bail and release him while his motion to withdraw a guilty plea to misdemeanor obstruction is pending.

Lewis has been in the DeKalb County Jail since Monday, since Judge Cynthia Becker rejected the prosecution’s recommendation of probation and instead sentenced him to 12 months in jail. Lewis, initially charged with racketeering and theft, pleaded guilty to interfering with the district attorney’s office’s investigation of him and former DeKalb schools Chief Operating Officer Pat Reid. The plea deal with prosecutors was they would recommend probation in exchange for his testimony against his one-time co-defendants, Reid and her ex-husband, architect Tony Pope.

Becker told Lewis’ lawyer on Monday, after the sentence was announced, that he could file a motion to withdraw the plea in light of the unexpected sentence, but Lewis would be in jail in the meanwhile. Becker also declined to consider a bond at that time.

Then the judge left town.

In an email exchange with prosecuting and defense lawyers a day later, Becker said she would address the issues of bond and the requested plea withdrawal on Tuesday, Dec. 17.

By that time, attorney Michael Brown wrote Friday in a filing with the Court of Appeals, Lewis would have been “illegally detained” for eight days.

The Appeals Court’s ruling noted that Georgia law says “at no time” should bail be refused for anyone appealing a misdemeanor conviction.

Presiding DeKalb County Superior Court Judge Courtney Johnson signed the order setting bond.

“We are grateful that the Court of Appeals heard our motion and ordered the trial court to grant bond,” Brown said on his way to pick up Lewis at the jail. “The trial court judge (Becker) should have done this herself and it’s unfortunate that our client had to stay in jail several more days because she wouldn’t do what the law required.”