Federal Judge Luther W. Youngdahl, 82, author of three famous rulings that defied the anti-Communist hysteria generated by Sen. Joseph R. McCarthy in the 1950s, died yesterday at his home in Washington. He had been suffering from cancer.

The rulings came in the case of Owen J. Lattimore, then a professor at Johns Hopkins University in Baltimore and an expert on Asian affairs.

The government accused Lattimore of having lied when he told a Senate investigating committee that he had never been a sympathizer or promoter of Communist interests.

The fact that the charges were brought was characteristic for the phenomenon known as McCarthyism. For the ntion was Gripped by a dread of communism. The Gold War had started in Europe and the Communists were triumphant in China. There was the drama of the Berlin Blockade and the Berlin Airlift in Europe and the outbreak of war in Korea. Winston Churchill had declared that Moscow had dropped an "iron curtain across the heart of Europe.

It generated enormous pressures on Judge Youngdahl. The way he handled it was characteristic of a public career that began in the 1920s when he was an assistant city attorney in his native Minneapolis and ended with his death as a senior judge of the U.S. District Court for the District of Columbia.

It was a career in which Judge Youngdahl served three terms as racketbusting Republican governor of Minnesota, who congratulated President Truman for firing Gen. Douglas MacArthur during the Korean conflict. And it was a career in which, years after the Lattimore case was over, Judge Youngdahl was arguing for stiffer and more uniform sentences for persons convicted of crimes of violence.

His first major ruling in the Lattimore case came in May 1952, when McCarthy was at the height of his power and U.S. casualties in the Korean conflict were approaching 50,000. Judge Youngdahl threw out key parts of the government's case on the grounds that they were unconstitutional.

In October, 1954, he denied an unusual request from Leo A. Rover, then the U.S. attorney for the District of Columbia and the prosecutor in the case, that the judge withdraw. Rover said Judge Youngdahl was prejudiced against the government and cited the 1952 ruling as evidence of this.

In January 1955, Judge Youngdahl dismissed a new indictment that had been returned against Lattimore to replace the first one. The government later dropped all charges.

For Judge Youngdahl, the case brought national fame and notoriety. He was praised by some for what they regarded as high-minded fairness and attention to constitutional liberties, and he was reviled by others for alleged pro-communism.

"I'm prouder of that case than anything else I ever did legally," the judge said in an interview last fall. "McCartthy. Even to mention the word "Communist" was a terrible thing."

Of Rover's request that he withdraw, the judge said, "I've never been so insulted in all my life. Before I went on the bench, I folded my hands and said a little prayer. I didn't ask any questions, I just let him talk . . . The meaning of communism: I asked him what he meant by that, and he said he'd go home and look it up in the dictionary. It was the toughest case I ever had."

Luther W. Youngdahl was born in Minneapolis on May 29, 1896. His parents were Swedish immigrants and his father ran a grocery store. He was reared in the Lutheran faith and throughout his life he spoke of religion as a natural and fulfilling part of his being.

He graduated from Gustavus Adolphus College in St. Peter, Minn., served in the Army during World War I, earned a law degree at the Minneapolis College of Law in 1921, and hung out his shingle. Having established a modest practice, he married the former Irene Annet Engdahl, who had been his sweetheart in college days. (They would have celebrated their 55th wedding anniversary on Friday).

From 1930 to 1936, he was a municipal judge in Minneapolis and then became a judge of the Hennepin County (Minneapolis) Court.

From 1942 to 1946, he was an associate justice of the Supreme Court of Minnesota. In 1947, he was elected to the first of three two-year terms as governor. He undertook reforms of the state's mental institutions with a view to rehabilitating the patients rather than merely "warehousing" them. He also was a racket-buster, enforcing the state's liquor laws and driving out slot machines.

"Not once - not once during the three terms that I was governor of Minnesota - did anyone every approach me to ask a favor, not about a contract or anything else," he once recalled. "Of course, they knew they would have been thrown down to the bottom of the steps of the Capitol if they had tried."

In 1951, the governor became a judge of the U.S. District Court for the District of Columbia.

By that time, Sen. Joseph McCarthy, a Republican from Wisconsin, already had become a household name. For on Feb. 9, 1950, he had told a Republican gathering in Wheeling, W. Va., "I have here in my hand a list of 205 (State Department officials) that were known to the secretary of state as being members of the Communist Party and who nevertheless are still working and shaping the policy of the State Department."

In the same month, McCarthy made his first reference to Owen J. Lattimore, telling members of the press that he was "pro-Communist."

A Senate subcommittee was formed to investigate the "Communists-in-government" issue raised by McCarthy. Its chairman was Sen. Millard E. Tydings (D-Md.). McCarthy told the Tydings committee that Lattimore was "the top Soviet espionage agent in the United States." In April 1950, McCarthy said he would "stake my whole case on this man (Lattimore). If I'm wrong about him, then I am discredited as a witness."

The Tydings committee called Lattimore. Over several days he testified that he was not a Communist and had never espoused Communist causes. What he had done, in fact, was devote his life to the study of Asia.

The Tydings committee reported that McCarthy's charges were a "fraud and a hoax." Whereupon McCarthy entered Maryland politics and assisted John Marshall Butler, a Republican in defeating Tydings. A principal charge in the campaign was that Tydings was "soft on Communism."

A second Senate committee was convened under the chairmanship of Sen. Pat McCarran (D-Nev). It also subpoenaed Lattimore. It was from his appearance before this committee that the charges against him grew.

The indictment, drawn up with the assistance of Roy Cohn, who later became famous as an aide to McCarthy, centered on Lattimore's statement that "I am not and have never been a Communist, a Soviet agent, sympathizer, or any other kind of promoter of communism or Communist interests, and all of these are nonsense."

The government contended that that statement was a lie.

In a passage that was typical of his rulings in the case, Judge Youngdahl wrote, "The First Amendment protects an individual in the expression of ideas though they are repugnant to the orthodox. When public excitement runs high as to alien ideologies is the time when we must be particularly alert not to impair the ancient landmark set up in the Bill of of Rights."

Recalling his life last year, the judge said, "If I had to write my ticket all over again, I wouldn't write it differently. Age is not a matter of arithmetic; it's the state of your mind and your outlook, the companion you have."

As he made that remark, Judge Youngdahl smiled at his wife, who was sitting on the arm of his chair.

In addition to Mrs. Youngdahl, survivors include a daugther, Margaret Peterson, of Ringwood, N.J.; two sons the Rev. L. William, of Palo Alto, Calif., and P. David, of Vienna, Va., and 10 grandchildren.