Dr. Theodore M. Bayless, whose discoveries helped bring relief to lactose- and gluten-intolerant patients and others coping with the effects of intestinal disorders, died on Feb. 10 in Towson, Md. He was 87.

The cause was cancer, his son Neal said.

Studies by Dr. Bayless, who taught, conducted research and cared for patients at Johns Hopkins University School of Medicine for a half-century, helped in the development of treatments for acute diarrheal diseases and for inflammatory bowel diseases, including ulcerative colitis and Crohn’s disease.

“While still a young investigator, he made the landmark discovery of the role of lactase deficiency (a genetic defect in the intestinal enzyme that digests milk sugar) in the adverse reactions to milk experienced by hundreds of millions of people all around the globe,” Prof. David Sachar, a friend and colleague and emeritus chief of gastroenterology at the Icahn School of Medicine at Mount Sinai in New York, said in an email.

He added, “His insights into this problem laid the foundations of the lactose-neutralization techniques (such as in Lactaid and many other products) that have revolutionized the dairy industry worldwide.”