Photo illustration by Sara Wadford/Shutterstock.

A Pennsylvania judge has announced her retirement after a state appeals court removed her from two sex offender cases and said she had shown “personal animus” toward the public defender’s office.

Judge Donna Jo McDaniel, 72, of Allegheny County will retire at the end of January after 33 years on the bench, the Pittsburgh Post-Gazette reports.

In her letter announcing her retirement, McDaniel said she was honored to have served as the county’s first female president judge and as administrative judge in the criminal division. Her most proud accomplishment, the letter said, was her role establishing specialty courts for domestic violence and sex offenders.

“I have strived to lead my courtroom in a judicial style that empowers victims of domestic and sexual abuse, while maintaining the rights of the accused,” she wrote.

But the appellate-level Superior Court of Pennsylvania had raised questions about McDaniel’s long sentences in some sex offender cases.

In November, the appeals court said McDaniel “continually refuses” to follow sentencing mandates and, in the case before the court, had made “gratuitous statements” and sarcastic statements about the defense lawyer. The court said McDaniel had “demonstrated bias and personal animus” toward the lawyer and the public defender’s office.

The appeals court removed McDaniel from another case this week, the Post-Gazette reported on Tuesday. The court had twice ordered McDaniel to resentence the defendant for sentencing errors and concluded after the defendant’s third sentencing that a new judge should impose a fourth sentence.

Both cases involved alleged sexual assaults of children.