A federal appeals court yesterday threw out televangelist Jim Bakker's 45-year prison sentence and ordered that a new judge resentence the defrocked preacher for his 1989 fraud convictions -- raising the specter of a Jim and Tammy comeback, if not right around the corner then certainly sooner than anyone dreamed.

A three-judge panel of the 4th U.S. Circuit Court of Appeals in Richmond said Bakker was fairly tried and convicted on 24 counts of wire fraud, mail fraud and conspiracy. But it ruled that the federal judge who sentenced him abused his discretion and violated Bakker's due process rights by making scathing remarks about "money-grubbing preachers."

"I am just delighted," said Bakker's wife, Tammy Faye, speaking from her New Covenant Ministries church near Orlando, Fla. "I just talked to my husband and the whole prison was excited for him. He was in a no-smoking class, and they broke in on the middle of the class and said, 'Jim, Jim, you've won your appeal!' "

Bakker's lawyers said they want to try to secure bail so the founder of the PTL Network -- which stands for Praise the Lord or People That Love -- could be freed from the federal prison in Rochester, Minn., until resentencing. Alan Dershowitz, the Harvard Law School professor who spearheaded the appeal, said he believes the sentence was so overly stiff that he will argue that Bakker be set free for time served.

"If you compare his sentence to those in the Wall Street cases, it was way out of line," he said. "The money was not as great and the culpability was not as great."

But Justice Department officials said they intend to fight for an "appropriate" sentence. "Obviously, we're gratified the conviction sticks," said spokesman Doug Tillet.

"We've made no secret that we want to pursue white-collar crime, whether it's savings and loan crooks, public officials or just your garden variety religious frauds," he said. "This was a very serious crime, and we'd argue that {Bakker} ought to be sentenced appropriately." He declined to specify how long a prison term prosecutors would ask for.

Bakker, the charismatic TV preacher who fell from grace in a sex and hush-money scandal, was convicted of fleecing his flock of millions of dollars in a 1989 trial, a soap opera-style media circus interrupted when one witness fainted on the stand and, later, when Bakker was found cowering under his lawyer's couch in a fetal position and suffering from hallucinations.

"Those of us who do have religion are sick of being saps for money-grubbing preachers and priests," said U.S. District Judge Robert Potter, who on Oct. 24, 1989, sentenced Bakker to 45 years in prison and fined him $500,000. "I just feel like there was massive fraud here and it's going to have to be punished."

But the appeals court ruled yesterday that judges cannot punish defendants for offending the judges' personal religious beliefs. "Whether or not the trial judge has a religion is irrelevant for purposes of sentencing," said the opinion. "The imposition of a lengthy prison term here may have reflected the fact that the court's own sense of religious propriety had somehow been betrayed."

During the trial, Bakker was portrayed as a high-living huckster who fleeced millions of dollars from his devoted flock to support a lavish lifestyle that included Rolls-Royces, $100,000 vacations, minks and diamonds for Tammy Faye, and $265,000 in hush money paid to former church secretary Jessica Hahn.

From the bench, the white-haired Potter often bristled with outrage, looking every bit the Old Testament Pharisee. Lawyers refer to him by the nickname "Maximum Bob" for the stiff prison terms he is known for handing out.

"It's a wonderful victory, not only for Jim Bakker, but for religious tolerance," declared Dershowitz, who sports a nickname as well -- "the Lawyer of Last Resort" -- for stepping up to the bench on behalf of convicted murderers and spies. "It sends a very firm message that judges can't inject their religious biases into religious opinions," he said.

Dershowitz took on Bakker's case "because I was outraged at the sentence. It's 10 times greater than any other case like this. Judge Potter takes a one-year case and makes it a decade. He just adds zeros."

After Bakker was sentenced, Dershowitz signed on to argue that the sentence exceeded federal sentencing guidelines that took effect Nov. 1, 1987. But the court said the guidelines did not apply because the conspiracy began in 1982. Those guidelines would have called for a 10- to 12-year sentence for Bakker's crimes, rather than the 45 years he was given.

The court also rejected Bakker's claims that his jury trial was tainted by publicity, that he was denied effective counsel, that two rulings on evidence were incorrect and that jury instructions were improper.

On the publicity charge, the court noted that the natty TV preacher turned up frequently on national TV shows before and during the trial. "A defendant should not be allowed to manipulate the criminal justice system by generating publicity and then using that same publicity to support his claim that the media attention surrounding his case created a presumption of prejudice," the court said.

Potter was undergoing surgery in Charlotte, N.C., and could not be reached, but a law clerk said there would be no change in his custom of never commenting to the press about his cases.

Others couldn't help but rejoice. Tammy Faye Bakker said she learned the news in a phone call yesterday from sobbing daughter Tammy Sue. "Everyone is so excited and we're deeply grateful. And I believe that before this is over, Jim is going to be totally exonerated of all wrongdoing," she said.

For the most part, Bakker's former detractors, disillusioned employees and sidekicks who spurned him after the fall, applauded the news yesterday. Jerry Falwell, founder of the Moral Majority, said he felt the sentence was unfair, but he advised so tarnished a preacher against attempting to make a comeback. Former Bakker bodyguard Don Hardester, who has been corresponding with Bakker in prison, however, said nothing would surprise him now.

"Prison has made him even more determined," he said in a telephone interview. "I know this sounds weird, but I expect him one day to be as big as ever. The little guy's a fighter, and when he's the underdog, that's when he's at his best."

Only Hahn, the church secretary turned Playboy centerfold, rained on the day's parade. "I always thought the sentence was too harsh, but Judge Potter was on the right course," she told CNN. "He is a man of backbone who was not about to kiss Jim Bakker's butt. ... I'm afraid the new judge may count his time served, add a few more years and then, down the road, he'll be free."

In a telephone interview, John Wesley Fletcher, the defrocked preacher who set Hahn up for her famous tryst with Bakker, said he was "pleased," adding he found it hard to hold a grudge. Hatred only fuels bitterness, he said.

Sighed Hardester: "It's the story that will not die."