This quasi-experimental study was conducted in Shiraz, the Islamic Republic of Iran, on 120 pairs of mothers and infants in a maternity hospital that had a rooming-in programme. All 59 mothers in the study group received breastfeeding education, face-to-face, after delivery and during follow-up for 4 months in the mother and child health (MCH) centre or in their homes; the remaining 61 mothers comprised the control group. Exclusive breastfeeding rates were significantly higher in the study group (54%) than in the control group (6.5%), but 5% and 18% of infants, respectively, in the study and control groups had stopped breastfeeding by the age of 4 months. The mean number of days of diarrhoea experienced by infants in the study group were significantly lower (P < or = 0.004) than in the control group. At the end of 4 months, the mean weight and length of the infants were significantly higher (both P < 0.05) in the study group than in the control group. The findings indicate that rooming-in is very important for promoting exclusive breastfeeding and that there is a need for continuous breastfeeding education of mothers.