In more than four decades as a New York City dentist, Irving Peress pulled teeth and filled cavities in unremarkable obscurity.

But for a few months 60 years ago, he was the focus of national attention: Exhibit A in Sen. Joseph McCarthy’s campaign to warn the nation of the communist threat to the American way of life and the extent to which it had already penetrated the country’s institutions.

Peress, who died Nov. 13 at 97, was a primary target in McCarthy’s drive to ferret out the communist fifth column in the Army, into which the dentist had been drafted during the Korean War.

He was commissioned as an officer in 1952 and signed an oath affirming that he had never been a member of an organization that sought to overthrow the government by unconstitutional means.

But he invoked his Fifth Amendment right to protection against self-incrimination when asked if he had ever been a member of the Communist Party or any affiliated body. This got him put under Army surveillance, but he was promoted nevertheless from captain to major in October 1953.

An anonymous source told the Senate’s Government Operations Committee about it. McCarthy, a Wisconsin Republican serving as chairman of its subcommittee on investigations, decided to hold hearings into communist saturation of the Army.

He wanted to know: How could someone under surveillance for communist connections get a promotion in the Army? This looked like yet another example of “coddling communists,” the senator said.

Several times during his testimony before McCarthy’s committee, Peress invoked the Fifth Amendment. McCarthy called him a “Fifth Amendment communist.” Peress said anyone attacking him for exercising this right was himself guilty of subversion. He repeated that he never sought the violent overthrow of the U.S. government.

To McCarthy, Peress remained the “key to the deliberate Communist infiltration of our Armed Forces.”

Later in 1953, Peress received an honorable discharge from the Army and went back to his dental practice, provoking yet another outcry: Why was it that a man with communist taints on his record was discharged honorably?

To which the Army replied it was no conspiracy, simply the military bureaucracy in motion.

“You know who promoted me?” Peress asked rhetorically in a 2005 interview with The New York Times. “Somebody was eating lunch or making a telephone call when my promotion passed across their desk. I slipped through.”

As the hearings continued, McCarthy began attacking government officials including Army Secretary Robert Stevens. The nationally televised showdown in 1954 known as the Army-McCarthy hearings drew near-unanimously disapproving coverage of McCarthy’s style and led to his censure by the Senate. He died three years later.

Meanwhile, publicity surrounding Peress’s encounter with McCarthy had cost him many of his dental patients. The Times said he was told to take his name off the door of his 28th-floor dental office. His house was stoned, and members of his daughter’s Brownie troop were warned against subversion.

Irving Peress was born in the Bronx, N.Y., on July 31, 1917. He graduated from City College of New York and in 1940 from New York University’s dental school.

During World War II, he applied for a commission in the Army Dental Corps but failed the physical exam because of a hernia. By the early 1950s, doctors and dentists were being drafted for the Korean War, and this time Peress passed the physical exam.

Peress had been a leader in the left-leaning American Labor Party, but in the Times interview, he continued to avoid answering questions about other political affiliations.

Twenty-five years after the hearings, most of Peress’s patients had either forgotten or had never known of his moment in the national spotlight. He retired in 1982.

“I was really not such an important cog in anyone’s wheel,” he told the Times in 1976. “I was something that got caught in the wheel.”

His wife, Elaine Gittelson Peress, died in 2012 after 65 years of marriage. Survivors include three children.

Peress died at his home in Queens, said his son Jeffrey. He added that his father had broken his leg in a fall and suffered complications.

Jeffrey Peress said his father was determined to live long enough to watch the World Series, which ended last month. After that, he stopped taking his thyroid medication.