The aim of this study was to assess the preventive effect of exclusive breast-feeding and early solid food avoidance on atopic dermatitis (AD) in infancy. This study is part of a dietary clinical trial in a prospective cohort of healthy term newborns at risk of atopy. It was recommended to breast-feed for at least 4 months and to avoid solid food in the same time-period. Eight hundred and sixty-five infants exclusively breast-fed, and 256 infants partially or exclusively formula-fed, were followed-up until the end of the first year following birth. AD and sensitization to milk and egg were considered as study end-points. The 1-year incidence of AD was compared between the two study groups. Adjusted odds ratios (OR) with 95% confidence intervals (CI) were calculated by multiple logistic regression. The incidence of AD was calculated in relation to age at introduction of solid food and amount of food given. In the breast-fed group, the adjusted OR for AD was 0.47 (95% CI 0.30–0.74). The strongest risk factor was the occurrence of AD in the subject's core family. The risk of infants with AD to be sensitized to milk was four times higher, and to egg eight times higher, than in infants without AD. Age at first introduction of solid food and diversity of solid food showed no effect on AD incidence. We conclude that in infants at atopic risk, exclusive breast-feeding for at least 4 months is effective in preventing AD in the first year of life.