HARRISBURG - After serving as the state's top law enforcement official for a mere two weeks, Bruce L. Castor Jr. will leave the Pennsylvania Attorney General's Office at the end of the week, state officials said Tuesday.

Castor, a former Montgomery County district attorney and commissioner, was hired by then-Attorney General Kathleen G. Kane last spring, and was quickly promoted to be her second-in-command.

He became the agency's leader after Kane resigned last month following her conviction on perjury and other charges stemming from abusing her office. But his time there was cut short after Gov. Wolf nominated longtime state prosecutor Bruce Beemer for the job.

"Looking forward very much to resuming my retirement from government service," Castor wrote in a text Tuesday, saying also that he would spend the remainder of the week assisting the transition to Beemer's tenure. "Nearly six months in Harrisburg was more than enough. For those who remain, I wish them all the best. It was quite an experience, to say the least."

Castor is one of the last high-profile Kane hires to leave in what has been a shake-up at the top.

After Beemer was confirmed by the Senate last week, one of his first acts was to fire two of Kane's more controversial hires: her onetime chief of staff, Jonathan Duecker, who was accused of making unwanted sexual advances toward two female employees, and her former head of security, Patrick Reese, who was charged alongside Kane last year and convicted of snooping on his colleagues' emails in a bid to learn more about the criminal investigation into Kane. Kane, a Democrat, allowed him to keep his $99,000 job after his conviction.

Though Castor, a Republican, has the reputation of being independent and not taking orders he does not agree with, his tenure was widely viewed as an extension of Kane's turbulent run of the office.

Beemer, a Democrat from Allegheny County, announced Tuesday that he had appointed Robert A. Mulle, who headed the office's Legal Review Section and was the agency's Right-to-Know officer, as his first deputy.

Beemer also named James A. Donahue III as his acting chief of staff. Donahue headed the office's Public Protection Division, and will continue in that position.

Voters will elect a new attorney general in November. Montgomery County Commissioner Josh Shapiro, a Democrat, is vying for the job against Sen. John Rafferty, a Republican from Montgomery County. The new attorney general will be sworn in in January of next year.

717-787-5934 @AngelasInk