HARRISBURG, Pa. (AP) - Pennsylvania’s judicial ethics court fined a former state Supreme Court justice $50,000 on Thursday, one week after he resigned because of his role in a sweeping scandal over lewd and objectionable emails exchanged within the state’s law enforcement circles.

The court expressed “disgust,” saying former Justice Michael Eakin “dramatically lessened public confidence in the integrity and impartiality of the entire judiciary.”

They said his punishment would have been more severe if he had not stepped down and taken responsibility. His lawyer said the decision means Eakin will keep his state pension, with an estimated annual value of $140,000.

They ruled he failed to conduct himself in a manner that promotes confidence in judges’ integrity and impartiality, saying he sent emails that “mocked minorities and placed women in submissive sexual stereotypes.”

“The common thread of the emails, with their imagery of sexism, racism and bigotry, is arrogance and the belief that an individual is better than his or her peers. Such beliefs are antithetical to the privilege of holding public office, where the charge is to serve, not demean, our citizens,” according to the unanimous six-judge opinion .

Eakin lawyer Bill Costopoulos said the decision closes the matter and the former justice will pay the fine within the six months allotted. The court said the amount was meant to be akin to a six-month unpaid suspension.

“It has been a very difficult ordeal and process for him personally and for his family and we’re all glad that it’s over,” Costopoulos said.

Large numbers of emails with obscene and denigrating content were first uncovered during an internal investigation launched by Democratic Attorney General Kathleen Kane into how her office had handled the Jerry Sandusky child molestation investigation before she took office. That probe found no evidence of political calculation in decision making over the prosecution of the former Penn State assistant football coach, but it did reveal that dozens of people in the agency had been trading inappropriate emails.

Eakin’s name surfaced in connection to those emails in late 2014, about the time the high court suspended Democratic Justice Seamus McCaffery, who soon abruptly retired. Eakin reported to ethics officials at that time that McCaffery had threatened to expose his own emails, but a review by the Judicial Conduct Board, which investigates and prosecutes judges in ethics cases, cleared Eakin.

The case was reignited last fall, as Eakin and the other justices voted to suspend Kane’s law license after she was charged criminally with leaking secret grand jury material and lying about it under oath. (That case is scheduled for trial in August, and Kane is not seeking re-election this year.)

Kane contacted the conduct board with new emails, leading to charges against Eakin, his tearful testimony in December at a preliminary hearing, his decision to retire last week and now the fine.

“The pattern evidenced by the body of all the emails demonstrated a misjudgment by (Eakin), both in his understanding of how electronic communications work, as well as the substantive content,” the court wrote.

The judges noted Eakin’s behavior was not criminal and said his judicial service had otherwise been exemplary.

“It has always been important to former Justice Michael Eakin to impress upon the Court of Judicial Discipline and the court of public opinion that, while he was on the bench for 20 years, every case he participated in was in accordance with the facts and the law,” said Costopoulos, his lawyer.

Eakin, 67, is a Republican who first joined the Supreme Court in 2002 following service on the intermediate Superior Court and as elected district attorney in Cumberland County, near Harrisburg. He has promised the court he will not seek or be appointed to any judicial office in the future.

Kane has ordered an outside review of all of her office’s emails over a recent multiyear period. That investigation, by former Maryland Attorney General Doug Gansler, is ongoing.