For a while there -- after the felony conviction, after the congressional reprimand, after the newspapers here found the mystery bank account -- it looked like Rep. George Hansen (R-Idaho) might be in serious political trouble.

The free-swinging conservative hit bottom in the polls last spring after he was convicted of filing false financial disclosure forms. Even longtime practitioners of the first rule of Idaho politics -- "Never bet against George" -- were predicting that moderate Democratic challenger Richard Stallings would win on Nov. 6 by a strong margin.

But to a consummate political pro like Hansen, a little thing like a felony rap is hardly more trouble than a three-stroke handicap might be to Arnold Palmer. Stumping the farms, fairs, and factories of his ruggedly beautiful east Idaho district, Hansen has hit on an issue that might just save his House seat.

It is, in two words, Geraldine Ferraro.

"I'm afraid Geraldine has handed George a victory," said Win Moore, a Democrat in Twin Falls who has been working against Hansen for years. "You wouldn't think a Democrat would do something that nice for a Republican."

The details of Democratic vice-presidential nominee Ferraro's financial disclosure situation differ in many ways from the Hansen case, but this has not stopped the battling congressman from milking what he calls the "Hansen-Ferraro situation" for all it is worth.

Like many conservative members of Congress, Hansen has made a career of bureaucrat-bashing, with the Internal Revenue Service and the Justice Department his favorite targets.

He has always attributed his legal problems to unscrupulous federal agents eager to strike back. "I've been some kind of a crusader against government abuses," he said, "and after a while you find yourself on the receiving end."

Hansen said his being prosecuted on a false financial disclosure charge was "selective" because "the Capitol is full of people who have some aberration or other on their disclosure, and they weren't prosecuted." Many people here believe that, but others tended to dismiss it as so much political smoke.

And then Rep. Ferraro (D-N.Y.) emerged with disclosure problems of her own, and Idahoans began to listen to Hansen. "That came along at a pretty good time," Hansen said. "It showed people there was some credibility to what I'd been saying."

"There's no doubt it clouds the issue somewhat," Stallings agreed. "There's really no connection between the Ferraro situation and what George was convicted of, but it feeds that notion that they're all a bunch of crooks and George was singled out."

Stallings, a professorial history teacher who sounds conservative on domestic issues but is critical of some of President Reagan's foreign policy initiatives, has a delicate job on the stump. He needs to focus the campaign on Hansen's legal troubles without hitting so hard as to create a backlash.

Stallings cannot really attack Hansen on issues because the incumbent's voting record -- he supports military spending and opposes domestic programs except for the federal water projects that irrigate this bone-dry region -- is closely attuned to this conservative district.

And so Stallings talks in general terms about "integrity" and leaves it to others to remind voters that their congressman has just been sentenced to prison.

Hansen faces a 5- to 15-month prison term but is free pending appeal. He said he is certain his appeal will succeed and he will not spend any of his next congressional term behind bars.

Among the harshest of Hansen's critics are the district's major newspapers. They blast away in biting editorials carrying headlines such as "Hansen's Deception Marks All-Time Low" (Twin Falls Times-News) and "Rep. Hansen's Double Talk Cheats State" (Boise Idaho Statesman).

The papers also have made hay with an item that drew only passing attention in Hansen's trial in Washington, D.C. According to trial documents, Hansen deposited $800,000 in a small Idaho bank in February 1979 and withdrew it the same month. His salary and honoraria that year totaled just over $60,000.

The congressman has hinted that the big cash influx was a loan, but he refuses to provide details of the account. "My lawyers always tell me I talk too much," Hansen said when asked about the account. "This time I'm taking their advice."

Whether an explanation is forthcoming, there is a sizable chunk of the electorate here -- estimates range from 25 to 40 percent of the voters -- who evidently will back Hansen no matter what the Justice Department or the media say about him.

These people proudly wear their "Hansen Hard Corps" T-shirts adorned with "I Love GEORGE" buttons. They line up by the dozens for autographed copies of the congressman's book, "To Harass Our People -- The Story of the IRS," and his wife's recipe collection, "Connie's Good Cookin.' "

Hansen, who is a fiery orator but engaging and folksy on the stump, readily admits that the "Hard Corps" is his greatest asset.

"They would vote for me if I were chained in the Bastille," he declared.

Hansen's 1984 campaign is reminiscent of the race run and won by former representative Charles Diggs (D-Mich.) after his 1978 conviction for padding his congressional payroll.

Diggs' heavily black district was determined to return him to Congress, as one voter explained then, "to show the white man in Washington that we're still behind him."

With similar sentiments, many Idahoans want to send Hansen back "to show the bureaucrats that they can't scare our people," as Margaret Mason, a Rigby, Idaho, businesswoman, put it.

As the Diggs case suggests, problems with the law have not always been the kiss of death for members of Congress. The late representative Adam Clayton Powell (D-N.Y.) won an easy victory after his conviction on contempt charges in 1966, and Rep. Frederick W. Richmond (D-N.Y.) was reelected after admitting to having solicited a male teen-ager for sex in 1978.

On the other hand, five House members ran for reelection after being ensnared in the FBI "Abscam" sting affair, and they were defeated.

The most effective line for candidates challenging a convicted congressman seems to be the assertion that the incumbent is an embarrassment to the honest people of the district. Stallings plays this card repeatedly in his campaign against Hansen.

Idahoans of every political persuasion share a deep pride in their state, known here as "The Gem of the Mountains." They eat large quantities of the famous potatoes (even in the form of "spudnuts," glazed doughnuts stuffed with mashed potatoes) and sing the state song ("Idaho, Idaho . . . romance is in her name") at every opportunity.

The heart of Stallings' campaign is an appeal to this pride. "Give me your vote," he says, "and George Hansen will never embarrass this great state again." But Hansen, who is famous for turning trouble into triumph, uses the same appeal on his own behalf.

"They're making me out to be Jack the Ripper because I made a mistake on a government form," he told the loyalists at the Madison County Fair.

"You notice that the government doesn't have any plans to prosecute Miss Ferraro," Hansen went on. "They only do that if you're a conservative from Idaho."