A second Pennsylvania Supreme Court justice quit the bench Tuesday in a widening scandal over raunchy and otherwise offensive emails that he and others exchanged with friends and lawyers.

Justice Michael Eakin's decision to retire marks the latest fallout since embattled state Attorney General Kathleen Kane began releasing hundreds of emails in 2014 to the media and ethics agencies. Kane has since been indicted on perjury and other charges that she claims were trumped up because she took on the old boys' club of Pennsylvania's judiciary and law enforcement.

Eakin's lawyer, Bill Costopoulos, said at a news conference that an ethics trial on charges related to the emails, which had been scheduled to start in two weeks, would not proceed. He said Eakin would agree to the allegations, leaving "nothing left to try."

"This is the only process I know of in America where you can be charged with sending emails to friends that were inappropriate and face the death penalty," Costopoulos said. "I just don't think that's right."

Justice Seamus McCaffery, a Democrat, abruptly retired in 2014 after being suspended by the court for his role in swapping the emails. Eakin was cleared at that time, but in September, Kane reignited the investigation by releasing more exchanges.

The board that investigates accusations of judicial misconduct said Eakin sent or responded to emails that included a satirical video about a busload of "sluts" crashing, a joke about a woman told to keep "her mouth shut" after telling her doctor her drunken husband had beaten her, a "sexually suggestive thread/conversation" about one of Eakin's female employees and a joke about Tiger Woods that referred to his African-American and Asian background.

The email scandal, centered on the attorney general's office, has already led to dozens of people being disciplined or losing their jobs.

Eakin, 67, has been on the state Supreme Court since 2002. He's a Republican and former district attorney in Cumberland County, which includes Harrisburg's western suburbs.

During tearful testimony in December before a three-judge panel of the court, Eakin apologized for what he said he "allowed to happen," but he accused the news media of sensationalism and argued his job performance hadn't been affected.

"Perhaps my demeanor is one of the boys," Eakin said on the stand. "But what I sent was to people who were also one of the boys. It was in the locker room. I allowed, I created something that could be released. Shame on me and it won't happen again."

Eakin used the pseudonym "John Smith" in a private email account for the emails at issue. The Judicial Conduct Board said he emailed a group of friends, including a deputy attorney general, about plans to visit a strip club in Myrtle Beach, South Carolina, using a vulgar term for women's breasts.

The state constitution says judges lose their pensions if they act in a way that "brings the judicial office into disrepute," one of the allegations Eakin faces. Costopoulos said he hoped that would not occur but it was not certain.

"We have lost one of the finest jurists of our court in the recent past," Costopoulos said. "His opinions and writing will withstand the test of history. What has happened to him and what has been done to him will not."

When Kane, a Democrat, turned over the new trove of emails in September, it was barely a week after Eakin voted with four other justices to suspend her law license. She argued the emails could violate rules that require judges to act in a way that promotes public confidence and prohibit them from appearing to undermine their independence, integrity and impartiality.

Kane's license was suspended a month after prosecutors in suburban Philadelphia charged her with perjury and other offenses for allegedly leaking secret grand jury material and lying about it. She is not seeking a second term this year, and her criminal trial is scheduled for August.

The exchange of explicit and pornographic emails by state prosecutors was uncovered as part of Kane's internal review of how the office handled the investigation into Jerry Sandusky, the former Penn State assistant football coach now serving a lengthy prison sentence after being convicted in 2012 of 45 counts of child sexual abuse.

Eakin's resignation leaves the seven-member Supreme Court with five Democrats, one Republican and one vacancy. A replacement would be nominated by Democratic Gov. Tom Wolf and require two-thirds confirmation by the Republican-controlled Senate.

Wolf issued a statement calling the case "another reminder of why we must all work with urgency to restore the public's trust in their government as well as the integrity of the judicial system."

Download the WTAE app for your phone or tablet to stay updated with breaking news throughout the day. (Free in your app store.)