Former presidential candidate John Edwards admitted yesterday that he had an extramarital affair with a filmmaker working for his campaign and repeatedly lied about it, but he denied that he fathered her 5-month-old baby.

Edwards said that he is "ashamed" of his conduct and that "it is inadequate to say to the people who believed in me that I am sorry." In the course of several campaigns, he said in a statement, "I started to believe that I was special and became increasingly egocentric and narcissistic. If you want to beat me up -- feel free. You cannot beat me up more than I have already beaten up myself."

The former senator from North Carolina, a Democrat, said that the affair took place in 2006 and that he confessed the "liaison" soon afterward to his wife, Elizabeth. He told ABC's "Nightline" that she was "furious" and added that he did not tell her about a secret visit he made to the woman, Rielle Hunter, in California last month. As a candidate, Edwards often talked about the importance of morality and family as he campaigned with Elizabeth, who has an incurable form of breast cancer.

In October, Edwards, 55, dismissed an initial report in the National Enquirer that he had had an affair with Hunter, 44, as "lies" and "tabloid trash." He said in the statement yesterday that he is willing to take a paternity test to establish that he is not the father of Hunter's girl.

Fred Baron, a Texas lawyer who was the finance chairman of Edwards's two presidential campaigns, in 2004 and this year, said in an interview that he has been sending unspecified sums of money to Hunter without informing Edwards. The payments helped Hunter relocate from North Carolina to a $3 million Santa Barbara home and helped Andrew Young -- a former Edwards aide who claims to be the baby's father -- move into a $4 million home in the same city. Edwards said he was unaware that money was being funneled to his former aides.

"It was a horrible situation," Baron said. "These people were being harassed," he added, referring to Young and Hunter.

After dodging reporters at public events for weeks, Edwards confirmed to ABC's Bob Woodruff that he had a five-hour, late-night meeting with Hunter last month at a Beverly Hills hotel. The reason, he said, was to persuade her not to publicly confirm the affair. Edwards also told "Nightline" that he did not love Hunter.

He maintains in his statement that the affair ended too soon for him to have fathered her baby, who was born Feb. 27. The National Enquirer this week published what it said was a photo of Edwards holding the baby, Frances Quinn Hunter, at the Beverly Hilton.

Hunter has also said that Young, a former Edwards fundraiser -- not to be confused with the former Atlanta mayor -- is the baby's father.

Former Michigan congressman David E. Bonior, who managed Edwards's White House campaign, said Edwards had "betrayed" those who believed in him and is finished in politics. "Thousands of friends of the senator's and his supporters have put their faith and confidence in him and he's let them down," Bonior said in a statement, adding: "You can't lie in politics and expect to have people's confidence."

In a statement posted on the liberal Web site Daily Kos, Elizabeth Edwards said: "John made a terrible mistake in 2006. The fact that it is a mistake that many others have made before him did not make it any easier for me to hear when he told me what he had done. But he did tell me. And we began a long and painful process in 2006, a process oddly made somewhat easier with my diagnosis in March of 2007. . . . I am proud of the courage John showed by his honesty in the face of shame."

Jennifer Palmieri, a longtime Edwards adviser, said on CNN last night that Edwards apologized yesterday to his campaign staff via a conference call.