NORRISTOWN -- A former top aide and longtime friend of Kathleen Kane testified Wednesday that he believed the attorney general and her political consultant tried to frame him for a leak of secret grand jury materials.

Adrian King, who served as first deputy attorney general in 2014, testified that Kane asked him deliver a manila envelope to Joshua Morrow, a political consultant who had worked for her 2012 campaign.

In a cross-examination that stretched into the early evening, Kane's attorney Seth Farber questioned inconsistencies in King's four appearances before the grand jury investigating leaks from her office. King admitted that he mistook one trip for another in the timeline of events surrounding the alleged leak in one of those appearances.

Farber asked King if he brought his uncertainty to Thomas Carluccio, the special prosecutor overseeing the grand jury

"I did after it became clear that the attorney general and Mr. Morrow tried to frame me, yes," King said, amid an increasingly heated exchange.

"That's what you think happened?" Farber asked.

"Yes."

Kane exited the courthouse without a word, ignoring requests to comment on King's testimony. Morrow and his attorney did not respond to requests for comment.

Prosecutors say King served as an intermediary for documents from a defunct 2009 grand jury investigation of former Philadelphia NAACP President J. Whyatt Mondesire, who was never charged and is now deceased. Kane allegedly orchestrated the leak and then lied about it.

Adrian King, former first deputy to the attorney general, leaves a Montgomery County courtroom after testifying for the prosecution in the trial against Attorney General Kathleen Kane Aug. 10, 2016. CLEM MURRAY / Philadelphia Inquirer & Daily News

King detailed his crumbling relationship with the attorney general that spring as she was publicly criticized for shutting down a sting targeting Philadelphia lawmakers. Kane and King first met in 1992 at Temple University School of Law and, according to King, dated and lived together for a year or two. They had been friends for more than 20 years and, when Kane was elected attorney general, she chose him to "make sure the trains run on time" in the office.

During nearly two hours of testimony, King gazed to his right to the prosecution table and the jurors, his arms crossed or folded in front of him. Occasionally, he glanced over to Kane. Kane crossed her arms and leaned back in her chair at the defense table.

King will return to the witness stand Thursday after Judge Wendy Demchick-Alloy adjourned the jury for the day.

In his cross-examination, Farber pointed out that King only referred to Kane as the "defendant."

"Maybe," replied King. "But I may have also referred to her as general."

Farber also asked if King had rehearsed his testimony Wednesday, noting his description of the back door of his home as his family's "primary point of ingress and egress." He went on to ask repeatedly if King was worried that he would face prosecution for his role in the alleged leak. King said he did not ask for immunity in exchange for his testimony.

"Did you minimize your involvement?" Farber asked.

"I didn't minimize anything," King said. "I told the truth."

King testified that he had contemplated resigning from the office prior to his role in the alleged leak, particularly in the wake of a March 2014 article criticizing Kane for shutting down a sting targeting Philadelphia lawmakers. According to prosecutors, Kane's own leak was in response to that article. Kane has maintained her innocence.

"The defendant was extremely upset and took it as a personal attack on herself and the office," King said.

In the wake of the bad publicity, King said he had advocated that his boss answer questions and explain the rationale for her decision to not pursue the case. Instead, Kane appeared at a Philadelphia Inquirer editorial board meeting with a private attorney in tow. Then, he said, she referred all office media requests to that private attorney.

During that public scandal, the former first deputy said he drafted his letter of resignation. He ultimately did not submit it to Kane due to ongoing commitments he had in the office and the potential fallout of such a decision.

"I was afraid if I submitted it and it was accepted, it would appear that it was my bright idea to bring (Kane's attorney) Dick Sprague into the editorial board," King said.

King did, however, advise that channeling all media requests through Sprague's office was improper and potentially illegal. He outlined his objections in an email.

"I fail to see how we can legally give the Sprague attorneys access to any Office of Attorney General filing," he said, because many of sting documents were barred from dissemination by the wire act, other state laws or court orders. It was also "highly unusual" for a government office to hire a private attorney to respond to questions from the press, he said.

Kane responded to King's email with one of her own, which the prosecution entered into evidence on Wednesday. In it, she wrote that she was well aware of the applicable laws.

"I am on my own," Kane wrote. "Nothing that I am not already used to."

The next month, King testified, Kane left for a trip to Haiti without leaving a designation letter that would allow him to make decisions in her absence. That left him struggling for an explanation when a law enforcement official from the Pittsburgh area met him in Harrisburg to sign off on a wiretap.

At first, he said, he figured it was an oversight. He soon learned, however, that Kane deliberately decided not to sign the authorization.

"I was told she didn't want a record of her being out of the country," he said. "I was rather outraged. I thought it was unconscionable."

That night, King removed all of his personal items from his office, put them in a cart and put them in his car. Their relationship was "professional but a bit tense" in the wake of that incident, he said.

A short time later, King testified, that he was planning a trip to San Diego for a meeting with other first deputies and chiefs of staff for attorneys general across the country. That Friday, on April 22, he said Kane asked him to deliver a package to Morrow.

After a phone call with Morrow, the two men agreed that King would leave the manila envelope between the front door and screen door of his home for Morrow to pick up since King would soon be traveling.

Less than two months later -- after King had submitted his two-weeks notice -- King said he saw the Philadelphia Daily News article detailing the Mondesire investigation. He didn't immediately connect that leak to a possible grand jury secrecy violation, he said, "because I don't know the details of that case."

"I thought it was odd," King said, of the article. "In the back of my mind, it reminded me of the Sprague decision."

Later, on cross-examination, Farber asked King why he chose to serve as an intermediary for the package.

"It would not be unusual to ask me to do this," King said, particularly when relaying a package to a campaign person on his way home.

Farber pressed on, asking if he saw any conflict with office staff being used to coordinate with a political operative. To that, King said, he thought of it as part of the job "as long as I kept it completely separate from my personal duties."

King added: "She was a friend of mine."