Kathleen Granahan and Adrian King dated when they were students at Temple Law School. They even lived together for a year or so. They parted as friends, and when she, now Kathleen G. Kane, became attorney general, she named King as her top aide.

On Wednesday, at Kane's trial on perjury and obstruction charges, King accused the attorney general of "trying to frame" him.

An angry King leveled that charge during a grueling cross-examination by Kane's legal team. He portrayed his former boss and friend as a thin-skinned public official who dodged questions from the media and ignored his warnings not to leak confidential investigative material.

Kane, 50, Pennsylvania's first elected Democratic attorney general, sat quietly and nearly expressionless at the defense table, sometimes whispering to her lawyers. During King's testimony, she turned her chair to face the witness stand and kept her eyes on her longtime friend, nodding along as her lawyer cross-examined him.

Like other witnesses before him - current or former Kane aides - King described her as incensed at a March 2014 Inquirer article reporting that she had secretly shut down a promising undercover investigation of Democratic officials in Philadelphia without bringing charges.

Kane is charged with leaking confidential grand jury documents - an illegal act that King contends she is attempting to pin on him.

Prosecutors say Kane released the documents to plant a news story to retaliate against a former state prosecutor who she believed was the source for the Inquirer story. She is also charged with lying about her actions to a grand jury.

"The defendant was extremely upset," King said, referring to Kane's response to the Inquirer story. "She took it as a personal attack on herself and also as an attack on the credibility of the office she was running."

Four days after the story's publication, Kane showed up for a meeting of the Inquirer Editorial Board but declined to answer questions, remaining silent while well-known Philadelphia lawyer Richard A. Sprague threatened a defamation suit.

"I was flabbergasted," King, 48, told the jurors. "I think every elected official is answerable to the public and the press. And if you make decisions, you need to answer questions."

With his relationship with Kane under growing strain, King also emailed her at one point to caution her against providing office investigative material to outsiders.

While Kane has admitted she wanted to provide the press with information about an old case, she has insisted that her goal was to do so in a lawful way, and said she left it to aides such as King to select the material shared with the Daily News for a June 2014 article.

The article suggested that a Kane critic, former state prosecutor Frank Fina, had failed to aggressively pursue a 2009 investigation of J. Whyatt Mondesire, the late Philadelphia civil rights leader.

Political consultant Josh Morrow and King acted as couriers to deliver material to the Daily News, though King has said he thought the envelope he ferried contained only benign campaign-related handouts.

Seth Farber, one of six members of Kane's legal team surrounding her in court, mocked King during his cross-examination. He ridiculed him for everything from using the words egress and ingress (Farber said this showed that King was rehearsed) to agreeing to be a messenger in the first place. ("Does the attorney general of Pennsylvania have a FedEx account?" Farber asked.)

King, appearing to seethe on the stand, said he had deeply researched the case, examining his own phone records after concluding that Kane and Morrow were united in an attempt to falsely pin the leak on him.

While Morrow is now a prosecution witness testifying under immunity, he at one time told prosecutors that King had a bigger role in the leak and Kane a lesser one. He later recanted.

Earlier in the day, Bruce Beemer, who took over as first deputy after King left the office, said he had been shocked by the Daily News article and its quotes from grand jury material. So he called Kane to ask whether he could investigate it, he said.

"She said: 'Don't worry about it, it's not a big deal. We have more important things to do,' " he said.

David Peifer, an agent with the office who conducted a key interview that was later passed on to the Daily News, said that he too saw the story as based on an improper leak.

"I was pissed, to say the least," he testified.

Peifer, who was granted immunity for cooperating with prosecutors, said he spoke with Kane to assure her he had not leaked the materials.

"Her response was, 'I would never suspect you of leaking that document. Don't worry about it.' "

Another witness, Michel Miletto, a veteran agent with the office, said on cross-examination by Kane's lawyers that he had already received questions about the Mondesire probe from a different reporter - suggesting that a leak that fueled the Daily News story was not the first time the secrecy of that investigation had been penetrated.

Still, Peifer told the jury Wednesday, he had a clear mission from Kane when he met with Miletto: "Find out why Frank Fina shut this investigation down."

The trial, before Montgomery County Court Judge Wendy Demchick-Alloy, is to resume Thursday. Cross-examination of King by Kane's lawyers will continue.

cmccoy@phillynews.com215-854-4821 @CraigRMcCoy