Jeremiah Stamler, a cardiovascular researcher who was at the forefront of studies that identified risk factors for heart diseases and ways to prevent it, died Jan. 25 at his home in Sag Harbor. He was 102.

Dr. Stamler’s long career also had a distinction unrelated to medicine: In 1965, he was accused of having been part of a Communist Party underground in the 1950s. He faced down the notorious House Committee on Un-American Activities by refusing to testify or to take the Fifth Amendment. Instead, he gave a statement saying he was a loyal American. Moreover, he filed a lawsuit on the grounds that the committee was unconstitutional and had no legislative function.

In his studies, Dr. Stamler demonstrated that eating a healthier diet, exercising, not smoking and reducing salt intake would reduce the likelihood of heart disease and strokes — advice that is commonplace now but was not widely accepted decades ago.

Dr. Stamler published nearly 700 peer-reviewed papers and wrote 22 books and monographs.