Rielle Hunter's daughter is about to celebrate her 2nd birthday
US politician John Edwards has admitted fathering an illegitimate child while he ran for the White House in 2007 and his wife battled incurable cancer.
The Democrats' former rising star told US media he had been wrong to deny that the child of film-maker Rielle Hunter was his daughter.
When he admitted the affair in August 2008 after a press report, he said it had ended in 2006 and denied paternity.
His wife Elizabeth said the whole family was relieved he had owned up.
The dispute over Frances Quinn Hunter, who will soon turn two, had been further complicated when an aide to the Democrat said that he, and not Mr Edwards, was the father.
Mr Edwards, who also ran for vice-president alongside Senator John Kerry in 2004 and once served as a senator for North Carolina, stepped out of the race for the Democratic ticket in January 2008 after failing to win a single primary.
The nomination was finally won by Barack Obama, who went on to be elected US president.
'Disappointment and hurt'
The child was born on 27 February, 2008, suggesting she was conceived in mid-2007, several months after Ms Hunter stopped being employed by the Edwards campaign, and in the early stages of the battle for the Democratic presidential nomination.
JOHN EDWARDS'S AFFAIR
December 2006: Declares bid for 2008 Democratic presidential ticket
Mid-2007: Daughter conceived with Rielle Hunter
January 2008: Pulls out of race for Democratic ticket
In a statement released to US news outlets on Thursday, Mr Edwards said: "I am Quinn's father.
"I will do everything in my power to provide her with the love and support she deserves.
"It was wrong for me ever to deny she was my daughter and hopefully one day, when she understands, she will forgive me."
He added that he had been financially supporting his daughter and that he had reached an agreement with Ms Hunter to continue providing support in the future.
"To all those I have disappointed and hurt, these words will never be enough, but I am truly sorry," said Mr Edwards.
In August 2008, he admitted having an extra-marital affair and lying about it during his campaign, but he dated the episode to 2006.
Speaking to ABC News, he said he had made "a serious error in judgment", that he had informed his wife about the affair in 2006, and that he had asked for her forgiveness.
His 2008 confession followed reports of the sex scandal in the National Enquirer newspaper, which Mr Edwards initially dismissed as "tabloid trash".
Asked by NBC why it had taken two years for Mr Edwards to publicly admit paternity, the politician's long-time adviser, Harrison Hickman, said: "There are a lot of adults involved, there are a number of families involved, and there are also a lot of kids involved."
Elizabeth Edwards, who has breast cancer, told the Associated Press news agency that her whole family felt relieved he had admitted paternity.
She was quoted as saying she believed her husband was "also relieved to put the matter behind him" and that she hoped the declaration would "help end publicity around the family's matters".
Declining to talk about her marital status, she said: "My marriage shouldn't be on anybody's radar screen except mine."
The Edwards's eldest son, Wade, was killed in a car crash at the age of 16. They have three other children.
Andrew Young, the former aide who claimed paternity of the child, is due to release a book on Mr Edwards' affair in early February.