Up until John Edwards officially claimed paternity of his mistress's daughter, his dying wife Elizabeth clung to his lies that he was not the father and on her death bed lamented that she would die alone because of his indiscretions, a friend testified today.

It was poignant testimony on one of the last days of the prosecution's case, but the day included a surprise as well.

Although much of the trial hinges on Edwards' relationship with his lover Rielle Hunter, the prosecution said it would rest its case Thursday without calling Hunter as a witness.

Jennifer Palmieri, a longtime friend of Elizabeth Edwards who worked as a spokeswoman for her husband's presidential campaign, broke down on the witness stand while she recounted Elizabeth's last days. Elizabeth Edwards died of cancer in December 2010.

"She was not able to speak at this stage," Palmieri, who now works for the Obama White House, said through tears.

"But before [she died, Elizabeth] expressed concerns because she didn't want to be alone," Palmieri told a rapt courtroom. "When she and John separated… she was concerned there would not be a man around to love her and I said: 'I would be there.'"

As Palmieri testified, Edwards, on trial for allegedly using campaign funds to cover up his mistress Rielle Hunter and love child, rubbed his eyes and pressed his forehead against his hand.

Edwards' daughter Cate, 30, who has been at her father's side almost every day of the trial, left the courtroom before Palmieri's emotional testimony about her mother's dying days. Cate also left the courtroom last week just before testimony about her distraught mother confronting Edwards about the affair on an airport tarmac, collapsing on the ground and tearing off her blouse.

Palmieri said until John Edwards finally came clean about patenity, his wife believed his claims that he had not fathered Hunter's baby Frances Quinn.

In August 2009, Edwards gave ABC News an interview, arranged through Palmieri, and admitted to his affair with Hunter, but denied fathering her child.

Those close to the couple, however, had their suspicions that Edwards was lying and Palmieri tried to help her friend Elizabeth see through her husband's lies.

"[Elizabeth] did not believe John was the father… but it was a difficult time for her and sometimes she expressed more doubt about him being truthful," Palmieri said.

"Some days, she had clarity," and would come to realize Edwards had fathered Hunter's baby, only to again give him the benefit of the doubt.

"I thought he was lying," Palmieri said. "I would respond I thought he was lying to [Elizabeth.]"

Palmieri also witnessed another moment where Elizabeth appeared to be deceived.

Together they learned that John Edwards' friend and political supporter Fred Baron and his wife Lisa Blue had been providing for Hunter, despite assurances that Edwards had ended his affair with her.

Elizabeth Edwards was unaware when she confronted Baron and his wife in an Iowa hotel in October 2007 that not only had Edwards not ended the affair with Hunter, but that his lover was pregnant,

Elizabeth Edwards was yelling at Baron for his support of Hunter.

"I believe John called me and asked me to come to (his) room because Elizabeth was very upset," Palmieri testified.

Elizabeth was outraged because she learned Baron and Blue were in touch with Hunter, even paying for a shopping spree in Los Angeles.

"All of this was news to Elizabeth," Palmieri said. "In her mind she and John had spoken about" the affair and she thought it was over.

"She didn't understand … why Fred and Lisa would be in contact with Rielle," Palmieri said, adding that Elizabeth believed their patronage would make it look like Edwards was continuing his affair.

"It makes John look more and more guilty," Palmieri recalled Elizabeth saying. Baron and Blue explained their relationship with Hunter as a means to keep her under control and from talking to the media.