Pennsylvania Attorney General Bruce Beemer speaks during a news conference at the state Capitol in Harrisburg, Pa., Tuesday, Nov. 22, 2016. Beemer said a review spurred by the revelation that employees had swapped sexually explicit and offensive material for years through office email found no evidence that the administration of justice had been undermined. (AP Photo/Matt Rourke)
Pennsylvania Attorney General Bruce Beemer speaks during a news conference at the state Capitol in Harrisburg, Pa., Tuesday, Nov. 22, 2016. Beemer said a review spurred by the revelation that employees had swapped sexually explicit and offensive material for years through office email found no evidence that the administration of justice had been undermined. (AP Photo/Matt Rourke) (Matt Rourke)

The Pennsylvania Office of Attorney General said Wednesday that it has agreed to pay BuckleySandler $1.4 million for its work investigating emails stored on OAG servers. The amount is nearly $400,000 less than the total outstanding fees billed by the firm.

Attorney General Bruce Beemer announced the agreement less than a week before a new attorney general, Josh Shapiro, is set to be sworn in.

“This agreement will allow the Office of Attorney General to move forward,” Beemer said in a statement. “With the new administration set to begin its work next week, it was imperative to resolve this issue and put the office in the best possible position for the future.”

BuckleySandler had issued $1,823,685 in bills to the OAG, according to Beemer’s announcement, but the OAG will only owe $1,435,588 under the new agreement. The office had already spent more than $385,000 on the review.

A team of BuckleySandler lawyers led by former Maryland Attorney General Doug Gansler was retained by former Attorney General Kathleen Kane in December 2015 to investigate more than 6.4 million documents and emails involving the OAG and other state employees. They were tasked with determining whether the relationships evidenced by those emails, which were sent between 2008 and 2015, adversely affected the state’s justice system.

Gansler said the discount given to the OAG is typical for a law firm working with a government client. The full cost included hundreds of thousands of dollars in third-party vendor fees, he said.

Gansler also noted that in 2015, when the investigation was announced, he promised to cap the cost at $2 million.

“Whenever a law firm contracts with a government agency … almost without exception, the law firm reduces its fees,” Gansler said.

A report released in November detailed a number of emails that the BuckleySandler team flagged as inappropriate. Beemer said then that he had passed the relevant findings on to the appropriate agencies for each of the state employees involved. But he also said the review unearthed no evidence of ex parte communication affecting the justice system, and that many of the emails flagged were actually “innocuous.”

When he announced the report’s findings, Beemer said any truly inappropriate or offensive email exchanges highlighted by BuckleySandler had already been reviewed and many had been released to the public before the investigation. And, Beemer noted, many of the recommendations included in the report were already in the works when the report was completed.

The emails were discovered in 2014, after Kane commissioned a review of another OAG investigation. Two state Supreme Court justices resigned in the wake of that discovery, and numerous other state employees were implicated or disciplined.

Beemer was not supportive of the BuckleySandler review at the start, when he was Kane’s first deputy. He noted that position in his November remarks, but said the public had a right to see a report that was produced using “significant taxpayer dollars.” However, when the report was released, Beemer redacted names of the people implicated. He acknowledged that many of the emails were actually offensive, but said many of those involved had already been disciplined.

“I wish this were done in a different way 18 months ago or 24 months ago so we weren’t still here talking about this two years later,” Beemer said.

Beemer inherited the investigation when he was appointed attorney general earlier this year, after Kane was found guilty of perjury and related charges and resigned. Bruce Castor Jr., the former state solicitor general, signed off on the OAG’s contract with Gansler soon after Kane hired him at the beginning of last year. Castor served as Kane’s first deputy from July, when Beemer was appointed Pennsylvania inspector general, to August, when Kane resigned. He briefly served as attorney general between Kane’s resignation and Beemer’s confirmation.

In late May, Castor had announced that a report on the email review would be released at a press conference. But the conference was canceled in a subsequent weekend press release in which Castor said the report needed more work.

Lizzy McLellan can be contacted at 215-557-2493 or lmclellan@alm.com. Follow her on Twitter @LizzyMcLellTLI.