Elizabeth Edwards, who as the wife of former Senator John Edwards gave America an intimate look at a candidate’s marriage by sharing his quest for the 2008 presidential nomination as she struggled with incurable cancer and, secretly, with his infidelity, died Tuesday morning at her home in Chapel Hill, N.C. She was 61.

Her family confirmed the death, saying Mrs. Edwards was surrounded by relatives when she died. A family friend said Mr. Edwards was present. On Monday, two family friends said that Mrs. Edwards’s cancer had spread to her liver and that doctors had advised against further medical treatment.

Mrs. Edwards posted a Facebook message to friends on Monday, saying, “I have been sustained throughout my life by three saving graces  my family, my friends, and a faith in the power of resilience and hope.” She added: “The days of our lives, for all of us, are numbered. We know that.”

In a life of idyllic successes and crushing reverses, Mrs. Edwards was an accomplished lawyer, the mother of four children and the wife of a wealthy, handsome senator with sights on the White House. But their 16-year-old son was killed in a car crash, cancer struck her at age 55, the political dreams died and, within months, her husband admitted to having had an extramarital affair with a campaign videographer.