Fred Kummerow in his laboratory in 2014. (Rick Danzl/ News-Gazette via Associated Press)

Fred A. Kummerow, a scientist who fought the food industry and prevailing medical practices for decades until his early warnings about the dangers of trans fats were finally vindicated, died May 31 at his home in Urbana, Ill. He was 102.

His death was announced by the University of Illinois, where he was a longtime professor. The cause was not disclosed.

Dr. Kummerow, who maintained a research laboratory until he was 101, was a biochemist who specialized in the study of lipids, or compounds containing fats. He also had an interest in the study of nutrition, dating to his days as a student, when he had to care for laboratory rats.

Early in his career, Dr. Kummerow helped develop a cure for pellagra, a chronic disease that killed more than 100,000 Americans between 1900 and 1940, primarily in the South. The disease was caused by a vitamin deficiency, which Dr. Kummerow solved by adding niacin to grits and other foods.

In the 1950s, Dr. Kummerow began his long and often contrarian study of heart disease. His research focused on the accumulated fats in blood vessels.

At the time, most doctors believed that saturated fat from animal products such as meats, butter and cheese were the principal culprits in producing harmful amounts of cholesterol, which could lead to heart disease.

Dr. Kummerow questioned that assumption as early as 1957, when he published his first paper about the dangers of trans fats, also known as trans-fatty acids. Most trans fats are created through an industrial process in which hydrogen is added to vegetable oils, making them solid at room temperature.

“Partially hydrogenated” oils can be stored longer without spoiling and can be used in margarine, for deep-fat frying and in countless forms of processed foods.

To Dr. Kummerow, they were “a diet of sudden death.”

In his laboratory, he examined the arteries of people who had died from heart attacks and strokes, discovering that they were often clogged with the residue of trans fats. In his experiments with pigs, he found the same results: If they were fed artificially produced fats, their arteries hardened and filled with plaque.

“By the time they were 3 years old,” Dr. Kummerow told NPR in 2014, “they had exactly the same kind of structure in their coronary arteries as the people who had died of heart disease.”

He reported his findings in hundreds of papers, but his research was ignored and denigrated for years. His studies of heart disease were often dismissed because he was a mere chemist and not a cardiologist.

Dr. Kummerow also maintained that cholesterol from animal products produced essential amino acids and that its nutritional risk had been greatly exaggerated. Instead, he urged people to avoid margarine, commercially produced crackers and cookies, soft drinks and fried foods.

“The most important muscle in your body is the heart,” he told the St. Louis Post-Dispatch in 2013. “If you treat it right, it will treat you right.”

Dr. Kummerow’s daily diet included a breakfast of eggs scrambled in butter. He drank three glasses of whole milk a day and regularly ate meat and cheese, along with fruits, vegetables and grains. He avoided processed foods and french fries.

In 1968, Dr. Kummerow recommended that the American Heart Association urge the food industry to reduce or eliminate trans fats. His ideas slowly caught on with other scientists, but the Food and Drug Administration made no official recommendation.

Dr. Kummerow sent a petition to the FDA in 2009 asking that trans fats be banned. Even though federal law required a response with 180 days, the FDA did not reply to his petition.

In 2013, Dr. Kummerow — then 98 — sued the FDA, asking that it rule on his petition. After a “tentative determination” that trans fats were not safe for human consumption, the FDA formally declared in 2015 that artificial trans fats should be eliminated from the U.S. food supply by 2018.

“Science won out,” Dr. Kummerow said.

Fred August Kummerow was born Oct. 4, 1914, in Berlin. He came to the United States with his family when he was 8 and grew up in Milwaukee. His father worked in a factory.

Dr. Kummerow became interested in science after receiving a chemistry set when he was 12. He worked his way through the University of Wisconsin, from which he graduated in 1939. He received a master’s degree in 1941 and a doctorate in 1943, both in biochemistry, from Wisconsin.

During World War II, Dr. Kummerow solved a vexing problem with frozen turkeys sent to U.S. troops overseas. He realized that the feed given to turkeys caused them to taste rancid. With a simple change of diet — corn instead of linseed — the natural flavor could be preserved.

He taught at Clemson University in South Carolina before joining the faculty at the University of Illinois in 1950. He formally retired in 1985 but maintained a laboratory for another 30 years.

His wife of 70 years, the former Amy Hildebrand, died in 2012. Survivors include three children; three grandchildren; and a great-grandson.

In 2013, Dr. Kummerow was asked what made him persist for so many years before his ideas gained general acceptance.

“Ask yourself why you were put on this Earth,” he said. “What are you here for? Then do it. What I wanted most out of life was to find an answer to heart disease.”