CHICAGO (AP) — A federal prosecutor who played a central role in former Gov. Rod Blagojevich’s trial and who is on the team prosecuting Dennis Hastert is leaving to become an Illinois judge.

A U.S. judge overseeing former U.S. Speaker Hastert’s case congratulated Carrie Hamilton during a Tuesday status hearing. Her appointment as a Cook County circuit judge takes effect Friday.

Hamilton also helped convict Blagojevich insider Tony Rezko. She opened his 2008 trial by telling jurors he was “the man behind the curtain, pulling the strings.”

She was a trial prosecutor in the case that sent Blagojevich to prison. Hastert pleaded not guilty after his recent indictment.

Most recently, Hamilton has been the deputy chief of the public corruption and organized crime unit at the U.S. attorney’s office in Chicago.

(TM and © Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)