The money, the indictment said, was used to cover up his affair with Rielle Hunter, a campaign videographer with whom he had a child, and to pay for her prenatal medical expenses, travel and accommodations.

The fact that Mr. Edwards tried to cover up his affair is not at issue. The Justice Department says that those contributions from two wealthy patrons were campaign donations and therefore subject to federal campaign finance laws that set limits on the amounts that can be donated and received, and require public reporting. Those two donations were well in excess of the limit of $2,300 that an individual can give.

The indictment says the money was actually used for campaign purposes: If the public knew that he was having an affair, his campaign would have been over. (It was over anyway in January 2008, before he confessed to the affair in August, after he lost too many primaries to Barack Obama and Hillary Rodham Clinton. But it might have imploded even earlier if the affair had been known.)

“Mr. Edwards is alleged to have accepted more than $900,000 in an effort to conceal from the public facts that he believed would harm his candidacy,” Assistant Attorney General Lanny A. Breuer said in a statement. “As this indictment shows, we will not permit candidates for high office to abuse their special ability to access the coffers of their political supporters to circumvent our election laws.”

The Edwards defense is that the money was used not for political reasons but for personal reasons: he wanted to conceal the affair from his wife.

The Edwards legal team, headed by Gregory B. Craig, who defended President Bill Clinton during his impeachment proceedings, says the government is trying an untested theory and applying a too-broad definition of campaign contributions.