Jennifer Palmieri said Edwards called her to a Davenport, Iowa, hotel room to help calm Elizabeth Edwards while she was arguing with campaign finance chairman Fred Baron and his wife, Lisa Blue, about the couple's financial support for Rielle Hunter.
Palmieri, now the deputy communications director for President Barack Obama, broke down in tears while discussing her friendship with Elizabeth Edwards, who was battling fatal cancer.
Palmieri also testified that she distanced herself from the former Democratic presidential candidate after he acknowledged the affair with Hunter in an August 2008 television interview, but wasn't truthful about their baby.
Palmieri said Blue admitted to Elizabeth Edwards that she had flown Hunter to Los Angeles for a shopping trip during the argument in October of 2007.
"You've got to hold your friends close and your enemies closer," Palmieri quoted Blue as telling the enraged wife. Blue added that Hunter was a "loose cannon" who could have exposed the affair to the media, Palmieri said.
At the time, a tabloid was publishing an article about the affair, and Palmieri said the campaign was absorbed with keeping the story from crossing over into the mainstream media. Edwards had told his wife he had a brief fling with Hunter, but that he had ended the affair many months earlier, according to earlier testimony.
In fact, Edwards had continued the affair and Hunter was then pregnant with his child. A close aide to Edwards, Andrew Young, had rented the mistress a home a few miles away from the Edwards family estate in Chapel Hill. The candidate had kept the arrangement secret from his wife.
Palmieri said Elizabeth Edwards couldn't comprehend why Baron and Blue would have any contact with Hunter.
"She didn't understand why they were embracing her, spending time with her," Palmieri said.
Asked what Edwards was doing during the argument, Palmieri said she didn't remember him saying much.
"He was more of a spectator than a participant," she testified.
Prosecutors told a judge that they plan to finish presenting their case on Thursday. Rielle Hunter was not among the witnesses that they said they planned to call to the stand. The defense could still call the mistress to testify once it is their turn to present evidence.
How much Edwards knew about the money spent on Hunter to cover up his affair is a critical question at his trial. Edwards has pleaded not guilty to six counts of campaign finance violations related to about $1 million in secret payments from Baron and 101-year-old heiress Rachel "Bunny" Mellon.
Edwards has denied knowing about the money, much of which was used to hide the pregnant mistress as he campaigned for the White House. Baron flew Hunter across the country in his private jet, paid for stays in luxury resorts and secured a $20,000-a-month rental mansion in California.
Earlier Wednesday, campaign speechwriter Wendy Button retook the witness stand after testifying the previous day about help she provided Edwards in drafting a statement during the summer of 2009. He intended to "come clean" about his lies regarding the affair and admit paternity of his child with Hunter, she said.
Edwards went through 13 drafts of the statement, getting feedback from his lawyers and a wide-ranging group of friends that included the actor Sean Penn, Button said. Edwards didn't release a statement admitting paternity until January 2010.
Button testified that Edwards admitted to her during that summer he knew "all along" that Baron had been supporting his mistress and baby. The girl was born in February 2008 a few weeks after he suspended his presidential campaign after poor showings in the early primary states.
That contradicts what Edwards has said about his knowledge of the money, most notably in a written statement and nationally televised network interview from August 2008.
On Wednesday, Edwards' defense lawyer Abbe Lowell admitted his client had "lied quite extensively" in that interview, saying he had only a brief sexual relationship with Hunter and denying he fathered her baby.
Palmieri said she had advised Edwards against doing the interview, which came shortly after tabloid reporters photographed Edwards visiting his mistress and baby at a Beverly Hills hotel.
"I said I did not want him doing the interview if he was going to lie," Palmieri recounted. "Even I didn't believe what he was saying."
But Palmieri said Edwards decided to go ahead anyway after his wife drafted a public statement for him denying the baby was his and pressed for its release. She said Elizabeth Edwards still believed her husband wasn't the father, and Palmieri tried to dissuade her of that notion.
"I would always respond, `No, no, no, he is lying to you,'" Palmieri said. "It was difficult to watch a person I cared about be completely consumed by this."
In an attempt to mitigate the damage from the planned interview, Palmieri said she selected ABC's Nightline as the venue for the interview because the news show was going up that night against the opening ceremony of the Beijing Olympics on rival NBC, which was expected to get far bigger ratings.
"If John couldn't do the interview and tell the truth, it was a mistake," Palmieri said. "I didn't think it would be great if the whole country watched."
After Edwards lied repeatedly in the interview, Palmieri said she asked a friend of Edwards' to deliver him a message that she didn't want him to call her for help any more.
"I believed John was continuing to lie and trying to drag me into it," Palmieri said.
She did see him occasionally because she remained friends with Elizabeth Edwards, who eventually separated from her cheating husband. Palmieri was with the Edwards family when Elizabeth died in December of 2010 after her long battle with cancer.
Palmieri broke down as she described how her friend wasn't able to speak in her final days, but had earlier told her about one of her greatest fears.
"She was concerned that when she died, there would not be a man who loved her there," Palmieri said.
The statement caused Edwards, who had showed no reaction for much of his former spokeswoman's testimony, to drop his head and put a hand to his face.
Asked by one of Edwards' lawyers if the husband was also at Elizabeth's bedside in her final hours, Palmieri dabbed away tears with a tissue.
"John was there," she replied.