The indictment in June of former North Carolina Sen. John Edwards seemed the inevitable crash landing of his plummeting career and personal life.

He faces prison. He could lose his legal license and forfeit a hugely successful practice as a personal injury lawyer. He’ll have to plead guilty or endure a public airing of how he cheated on his cancer-stricken wife, Elizabeth, dead almost a year now.

But the charges have also had an unexpected regenerative effect. They have put Edwards back into the arena where he thrives. He has hired top defense lawyers. He has refused to plead to any of the indictment’s six felony charges relating to campaign finance law violations. And his team is effectively counterpunching a federal case that even some neutral observers consider poorly grounded in the law.

Now, five months after the indictment that completed his transformation from a rising political star to perhaps the nation’s most notorious cad, Edwards may again perform courtroom magic. He could be on the way to winning his biggest and most hopeless casehis own.

In U.S. District Court in Greensboro last week, Judge Catherine C. Eagles denied five defense motions to dismiss the case. But significantly, she left open the possibility that some arguments against the validity of the charges could be raised again during the trial, set to open in January.

On leaving the courthouse, Edwards paused to tell the media that he expects to beat back what his lawyers say is a legally groundless, politically motivated effort to paint him as a criminal.

“After all these years, I finally get a day in court, and people get to hear my side of this and what actually happened,” Edwards said. “What I know with complete and absolute certainty is I didn’t violate campaign laws.”

Despite his avowed hunger to make his case, Edwards can’t be looking forward to having the details of his affair with Rielle Hunter and the subsequent pregnancy examined at trial. But after two days in court last week, the trial lawyer in Edwards may indeed be growing eager. As expected, the government’s case was not immediately derailed by the defense motions, but the debate over them revealed what defense lawyers consider promising lines of attack.

Edwards lawyer Abbe Lowell said he was “gratified” that while the judge denied the motions, the questions raised had effectively framed the trial. The challenge for the defense will be to keep the jury focused on the law while prosecutors erode Edwards’ character.

A former federal prosecutor said a character attack may not sway a jury. Ken Julian was an assistant and deputy U.S. Attorney in California for 11 years and is now a trial attorney in Los Angeles. Julian prosecuted former Orange County, Calif., Sheriff Michael Carona on charges similar to Edwards’. The sheriff was accused of failing to report cash gifts that he used in part to support a secret affair. The jury acquitted him on multiple counts but convicted him of witness tampering.

Julian said focusing on the affair “made a big splash” early in the trial, “but I think juries will almost always look beyond that. They want to know: ‘What did this guy do that was illegal?’”

An Aug. 18, 2008, FBI memo indicates how the probe began. Federal investigators suspected that Edwards converted campaign funds to cover up his affair with Hunter, with whom he fathered a child.

But the investigation found that the attempt to the hide the affairincluding nearly $1 million in gifts of cash, flights and housingwas funded by two wealthy Edwards supporters. The late Fred Baron of Texas, the Edwards campaign’s national finance chairman, and the 101-year-old Virginia heiress Rachel “Bunny” Mellon funneled the money through third parties.

The indictment says the gifts were effectively campaign contributions because they were aimed at protecting Edwards’ image and keeping his presidential prospects alive. Under that definition, Edwards was charged with failing to report contributions and accepting individual contributions in excess of federal limits.

His defense team, led by Lowell, a Washington, D.C., attorney, and James Cooney of Charlotte, says the indictment accuses their client of breaking a law that doesn’t exist, because the gifts were not campaign contributions. They’ve bolstered their argument with affidavits from two former leaders of the Federal Election Commission.

“I was unable to find any case or matter with presidential value that states that the conduct described in the Indictmentor any conduct similar to itconstitutes a violation of the federal campaign finance laws,” Robert Lenhard, a Washington attorney who served as the FEC chairman in 2007, said in his affidavit.

Scott E. Thomas, a former FEC commissioner and now head of the Political Law Practice at the Washington-area firm Dickstein Shapiro LLP, states the same conclusion in his affidavit. Prior to the indictment, both Thomas and Lenhard signed a letter to the head of the U.S. Justice Department’s Public Integrity Division advising against criminal charges. They wrote that the facts “do not make out a knowing and willful violation of the campaign finance laws warranting criminal prosecution.”

Michael L. Weisel, a Raleigh attorney who specializes in election law and is not involved in Edwards’ defense, said those opinions point to an acquittal. If those who oversaw the enforcement of campaign finance law don’t think Edwards broke the law, Weisel said, Edwards can’t be convicted of knowingly committing a crime.

Julian, the former federal prosecutor, sees the same weakness in the government’s case. “I think the government is going to have a difficult time proving John Edwards’ intent if there is a legitimate issue of whether this was a crime or not.”

During the hearings, federal prosecutor Robert J. Higdon flashed annoyance with defense claims that the government was stretching the law to snare Edwards. Higdon told the judge that when a man seeking the presidency takes more than $900,000 “under the table,” the U.S. Justice Department has ample reason to investigate.

Prosecutor David Harbach also dismissed the defense, saying it was taking refuge in technicalities.

Edwards “doesn’t insulate himself from liability just because he’s smart enough not to get his hands dirty,” Harbach said in court.

But the basis of the indictment has elicited objections from beyond the defense. Groups that advocate for clean elections worry the indictment will muddy the definition of a campaign contribution.

Watchdog group Citizens for Responsibility and Ethics (CREW) in Washington filed a friend-of-the-court briefover the objections of prosecutorsin support of Edwards’ motion to dismiss the case.

“I think [a conviction] will wreak havoc on our campaign finance laws,” said Melanie Sloan, CREW’s executive director.

Thomas Manning, a Raleigh attorney not involved in Edwards’ defense, knows about having a client who becomes the target of a federal prosecution based on a controversial use of the law.

Manning represented former state lottery commissioner Kevin Geddings, who was sentenced to four years in prison in 2007 for failure to disclose to a state ethics panel his previous ties to a company that was expected to bid for a state lottery contract. Geddings was convicted under the so-called honest services law, although there was no evidence that he benefited from his ties. The U.S. Supreme Court last year found the widely used law to be unconstitutionally vague. Geddings requested and was granted release; his conviction was vacated.

Manning said the case against Edwards contains a similar vagueness.

“I think there’s probably a huge question about whether it constitutes a violation or not,” Manning said. “It’s going to take more than just wanting it to be a crime for it to stick.”

As the defense raises doubts about the basis of the charges, it is also fueling questions about the motives behind them. A defense motion noted that the U.S. Attorney George Holding, who brought the charges, was a former staffer of the late Republican Sen. Jesse Helms. Holding also contributed to Republican Sen. Lauch Faircloth, the incumbent Edwards unseated in 1998.

Holding added to the speculation by stepping down from office and announcing his Republican candidacy for Congress one month after signing the Edwards indictment.

Bob Hall, executive director of the non-partisan election watchdog group Democracy North Carolina, said the government’s unorthodox definition of a crime looks odd. After nearly three years of investigating by the U.S. Attorney’s office, the IRS and the FBI, the public expected a clear-cut case.

“I’m not in the camp that believes there are partisan motives,” Hall said, “but it is a problem when they take so long and what they come up with is so outside the box.”

Efforts to reach Holding were unsuccessful. His campaign manager, Tucker Knott, and his campaign adviser, Carter Wrenn, a former consultant to Helms, said Holding couldn’t respond. They cited ethics rules that bar a former prosecutor from discussing a pending case; Holding has extended that rule to his staff.

In court, prosecutors denied the possibility of a political motive behind the charges, noting that the decision to seek an indictment was approved by the U.S. Justice Department under a president who is a Democrat.

In its motion to dismiss the indictment, the defense said the eventual approval in Washington “cannot overcome that the case was brought, steered and ultimately signed by a U.S. Attorney who had an actual or profound appearance of conflict of interest and whose involvement taints the process.”

While he may be making gains in his legal fight, Edwards is unlikely to draw popular support as a victim. Even some who see the merits of the legal arguments raised in his defense find it hard to defend him.

Sloan said it was hard to enter the case on Edwards’ behalf.

“The fact is, everybody hates John Edwards and no one wants to be in the position of defending the guy,” she said.

But there is a least one person who’s taken up the defense with fervor. That’s a trial lawyer named John Edwards.