(Reuters) - Pennsylvania Supreme Court Justice J. Michael Eakin resigned on Tuesday, the second jurist to step down after being accused of using state computers to exchange sexually and racially offensive emails with his peers.

Eakin, 67, a Republican first elected in 2001, tendered his resignation from the state’s highest court after admitting to sending approximately 18 “inappropriate” emails to friends, according to a statement form his lawyer, William Costopoulos.

Eakin is the second Supreme Court justice caught up in the email scandal, dubbed “Porngate” by local media.

Justice Seamus McCaffery, a Democrat who traded offensive emails, was suspended by his fellow justices in October 2014 and later resigned. Several other state officials linked to the scandal have also stepped down.

The trove of offensive emails allegedly exchanged by Eakin, McCaffery and others was discovered unexpectedly during an investigation by Attorney General Kathleen Kane into how one of her predecessors, Tom Corbett, had carried out the investigation of Penn State sexual predator Jerry Sandusky.

Sandusky, 72, a convicted serial child molester, is serving 30 years to 60 years in prison.

As a result of the emails, Eakin was slated to go on trial later this month to determine whether he violated judicial ethics. Instead, he will file a stipulation of facts that will be reviewed by the state Court of Judicial Discipline in order to impose a penalty, Costopoulos said.

The most severe punishment would be the loss of Eakin’s pension, Costopoulos said.

“He has accepted responsibility for the sending of these emails,” Costopoulos said. “He has apologized to his Court, to the public at large, to his family and friends, and most recently to the Court of Judicial Discipline. There is nothing to try.”

Some of the offensive emails allegedly exchanged by Eakin contained female nudity or ridiculed African-Americans, while others were misogynistic or homophobic, according to a 48-page ethics complaint. Eakin also created a fictitious email account in an attempt to disguise his connection to them, the complaint said.

Kane has held out the email scandal as an example of the “old-boy culture” she says permeates the state legal system.

The first Democrat and first woman to be elected attorney general in Pennsylvania, Kane has since seen her law license suspended over perjury charges stemming from a grand jury leak and has contended that her troubles were caused by enemies worried she would reveal the e-mails.