A widening scandal over the exchange of emails containing pornography by current and former members of the attorney general’s office has gripped the Pennsylvania capitol all week.

Pennsylvania’s state supreme court chief justice demanded information on whether any judges were part of the exchanges. Governor Tom Corbett, who was attorney general when the emails were exchanged, was forced to defend his management of the office as he campaigns for a second term.

And on Thursday, two top officials who followed Corbett from the attorney general’s office into his gubernatorial administration resigned.

Corbett disclosed the resignations of Environmental Protection secretary Christopher Abruzzo and Glenn Parno, a top lawyer in the Department of Environmental Protection, in separate announcements hours apart, just as the attorney general’s office was releasing copies of their email messages to the governor’s office and news organizations.

Their departures came a week after Attorney General Kathleen Kane’s office identified them as being among eight ex-employees who sent or received hundreds of pornographic images or videos in emails that were discovered during Kane’s review of the Jerry Sandusky child sex abuse prosecution.

All eight men, who also include state police commissioner Frank Noonan, worked under Corbett while the latter was the state’s elected attorney general from 2005 to 2011. Corbett had requested details on the emails in question before determining if the four men employed in his administration should keep their jobs.

Kane is a Democrat who took office last year. Corbett, a Republican, is in the closing weeks of an uphill re-election campaign against Democrat Tom Wolf.

A review of the heavily redacted emails revealed an abundance of comments that were sexually suggestive, mostly about photographs that were originally attached to the emails but were not included in the released material.

Some of the more than 300 emails that the attorney general’s office says Noonan received bore sexually tinged subject lines, such as “Bikini Wax Job”.

Another message, received by some but not all of the participants, included a slur used against people of Arab descent and others who wear headdresses. Others expressed insensitive remarks about gays.

Abruzzo did not mention the emails in his resignation letter, which was released by Corbett’s office. He wrote that he had not been given an opportunity to review any evidence to support the assertions against him but that he did not want the allegations to become “a distraction” for the Corbett administration.

“While I have no recollection of the specific accounts described by the media, I accept full responsibility for any lack of judgment I may have exhibited in 2009,” he wrote. “I do not condone that behavior and it is not a reflection of the person or professional that I am.”

The letter was Abruzzo’s first public comment on the emails.

Abruzzo, 48, started in the attorney general’s office in 1996 and advanced to oversee its drug-related prosecutions. When Corbett became governor in 2011, he made Abruzzo one of his deputy chiefs of staff and, later, environmental protection secretary, a Cabinet post.

Noonan, who is directing the manhunt for a fugitive suspected of killing a state trooper and wounding another in an ambush at a north-eastern Pennsylvania barracks, has not commented.

The attorney general’s office said Noonan received more 300 of the emails, but Corbett said records indicate that “he did not participate in opening, originating, forwarding or replying to any message.”

No reason was given for Parno’s resignation.