HARRISBURG, Pa. — Pennsylvania’s new attorney general said Tuesday his predecessor’s former second-in-command will leave the job after this week, the latest in a series of shake-ups at the beleaguered office.

Bruce L. Castor Jr.’s last day as solicitor general will be Friday, Attorney General Bruce Beemer said in a statement.

Former Attorney General Kathleen Kane, a Democrat, created the position of solicitor general in March and filled it with Republican Castor, a former district attorney and elected commissioner in Montgomery County, a Philadelphia suburb. He is also a central figure in the Bill Cosby case, having chosen a decade ago not to charge the entertainer with sex assault.

Kane resigned Aug. 17, two days after her conviction on charges she abused the powers of her office by leaking secret grand jury information to smear a rival and then lied under oath to cover it up.

Castor ran the office after Kane resigned, but Democratic Gov. Tom Wolf quickly nominated Beemer to step in for the remaining months of Kane’s term. Castor lacked support from Wolf and top state lawmakers, and also became a target of criticism that he was an extension of Kane, a characterization he rejected.

Beemer was confirmed by the Senate and sworn in to the office Aug. 30.

Castor vowed to do anything Beemer asks to help the transition and said in an email he was looking forward to resuming a retirement from public service.

“Nearly six months in Harrisburg was more than enough,” he told the AP. “For those who remain, I wish them all the best. It was quite an experience, to say the least.”

Beemer on Tuesday also named Robert Mulle as first deputy attorney general and appointed James Donahue III as acting chief of staff.

Tuesday’s announcements came as the office continues to revamp staffing in the aftermath of Kane’s conviction and resignation.

Last week, Beemer fired two of Kane’s confidants, including a former police chief convicted of contempt for snooping through emails about a grand jury’s investigation of her.

Jonathan Duecker, who was Kane’s chief of staff, was sent a termination letter, as was supervisory special agent Patrick Reese, formerly the chief of police in Dunmore.

Kane faces the possibility of prison time when she is sentenced on Oct. 24.