The trial of onetime Democratic presidential hopeful John Edwards opened Monday, with the former U.S. senator from North Carolina fighting charges that could carry a maximum 30-year prison sentence and $1.5 million in fines.

Edwards, the Democrats' 2004 vice presidential nominee and two-time White House contender, faces six felony counts in a Greensboro, N.C., federal court for allegedly conspiring to take illegal campaign contributions to cover up an affair with a staffer, Rielle Hunter.

Prosecutors say two wealthy Edwards donors forked over more than $900,000 in hush money to protect the senator's presidential campaign, which would surely have ended if the public had learned the married father of three was cheating on his cancer-stricken wife, Elizabeth.

With his campaign hinging on keeping the affair secret, prosecutors say the payments constituted illegal campaign contributions that exceeded a $2,300 limit for individuals. Edwards admitted in 2010 to fathering a child with Hunter, after persistently denying the affair during his 2008 presidential campaign; a close aide, Andrew Young, falsely copped to being the father of Hunter's child in order to protect his boss.

Edwards, a wealthy trial lawyer who won a Senate seat in 1998 and launched his first national campaign in 2004, has said the affair was a personal failing but denied violating campaign finance laws.

Edwards' defense team has said the money from two friends -- banking heiress Rachel Bunny Mellon and the candidate's 2008 campaign finance chairman Fred Baron, who has since died -- was personal gifts, not campaign funds. The money went toward Hunter's personal expenses and prenatal care, but was never given directly to Edwards or his presidential campaign account, according to Reuters.

According to the June indictment, Edwards was charged with a count each of conspiracy and concealing the donations in campaign filings, and four counts of accepting illegal contributions. Each count comes with a maximum of five years in prison and a $250,000 fine.