We conducted a population-based case-control study of inflammatory bowel disease and dietary habits in Stockholm during 1984-1987. We obtained retrospective information about food intake 5 years previously by a postal questionnaire for 152 cases with Crohn's disease, 145 cases with ulcerative colitis, and 305 controls. The relative risk of Crohn's disease was increased for subjects who had a high (55 gm or more per day) intake of sucrose (relative risk = 2.6, 95% confidence interval = 1.4-5.0) and was decreased for subjects who had a high (15 gm or more per day) intake of fiber (relative risk = 0.5, 95% confidence interval = 0.3-0.9). The most striking finding was an increased relative risk of both Crohn's disease and ulcerative colitis associated with consumption of fast foods: the relative risk associated with consumption of fast foods at least two times a week was estimated at 3.4 (95% confidence interval = 1.3-9.3) for Crohn's disease and 3.9 (95% confidence interval = 1.4-10.6) for ulcerative colitis. Although coffee seemed to provide a protective effect for both diseases, there are reasons to consider this finding an artifact.