Media playback is unsupported on your device Media caption John Edwards: "There is no question that I have done wrong... but I did not break the law"

Former US presidential hopeful John Edwards has pleaded not guilty to violating campaign finance laws in an effort to hide an extra-marital affair.

A North Carolina grand jury charged the Democrat with using cash from two donors to shelter campaign aide Rielle Hunter, with whom he fathered a child.

It said he illegally used the campaign funds to pay her living expenses and hide her from the media.

The former North Carolina senator, 57, ran for president in 2004 and 2008.

"There's no question that I've done wrong and I take full responsibility for having done wrong and I will regret for the rest of my life the pain and the harm that I have caused to others," Mr Edwards told reporters outside the courtroom.

"But I did not break the law and I never ever thought I was breaking the law."

'Affair and pregnancy'

The indictment in federal court accused Mr Edwards of using $925,000 from former campaign finance chairman Fred Baron and Rachel Mellon, the 100-year-old widow of banking heir Paul Mellon, to cover up his affair with Ms Hunter in order to protect his bid for the White House.

"A centrepiece of Edwards' candidacy was his public image as a devoted family man," the indictment read.

"Edwards knew that public revelation of the affair and the pregnancy would destroy his candidacy by, among other things, undermining Edwards' presentation of himself as a family man and by forcing his campaign to divert personnel and resources away from other campaign activities to respond to criticism and media scrutiny regarding the affair and pregnancy."

Mr Edwards at the time was married to Elizabeth Edwards, a figure widely admired by Americans for her courageous public fight with breast cancer.

The couple split in January 2010 after he admitted the affair, and Mrs Edwards died of cancer less than a year later.

Edwards' public image

Mr Edwards, a wealthy former trial lawyer, was elected to the US Senate in 1998 and served a single term. He ran for the Democratic presidential nomination in 2004, and after failing in that bid joined Senator John Kerry as vice-presidential candidate on the Democratic ticket.

It was during his second presidential bid in 2008 that his campaign hired Ms Rielle as a campaign videographer. He withdrew from that race in January of that year.

Mr Edwards is charged with one count of conspiracy to violate federal campaign finance laws and to make false statements to finance regulators, four counts of taking illegal campaign contributions, and one count of concealing illegal donations from regulators.

The indictment charged that Mr Edwards solicited and accepted campaign contributions over the $2,300 limit per individual in the primary campaign, then had his campaign committee file false finance reports with federal election authorities.

'Broken no law'

If convicted, Mr Edwards faces up to five years in prison and a $250,000 fine.

On Friday, Mr Edwards's lawyer Gregory Craig said no-one involved in Mr Edwards campaign - including himself, would have known the payments from Mr Baron and Mrs Mellon should have been treated as campaign contributions.

"This is an unprecedented prosecution," he said outside the courthouse in North Carolina.

"He has broken no law and we will defend this case vigorously."

The indictment and an arrest warrant were filed in Greensboro in North Carolina, where Mr Edwards' campaign was based.

Mr Edwards' lawyers and federal prosecutors tried to negotiate a deal on Thursday that would allow the former presidential hopeful to plead guilty to a charge, the Associated Press news agency reported, citing sources.

The talks did not yield an agreement, after prosecutors reportedly insisted on a plea to a felony, which would have endangered Mr Edwards' license to practice law.

The investigation into the alleged cover up has been underway since at least early 2009, when the former senator confirmed political groups linked to him were among the potential targets of a probe into his finances.

Investigators reportedly combed through Mr Edwards' entire political career, examining his political action committees, a nonprofit he helped establish and even his time in the US Senate, which ended seven years ago.