context: promotion of breastfeeding in brazilian maternity hospitals. objective: to quantify changes in the breastfeeding duration among mothers served by hospitals exposed to the wellstart-slc course, comparing them with changes among mothers attended by institutions not exposed to this course. design: randomized institutional trial. setting: the effects of training on breastfeeding duration was assessed in eight brazilian hospitals assigned at random to either an exposed group (staff attending the wellstart-slc course) or a control group. sample: for each of the eight study hospitals, two cohorts of about 50 children were visited at home at one and six months after birth. the first cohort (n = 494) was composed of babies born in the month prior to exposure to the wellstart-slc course, and the second cohort (n = 476) was composed of babies born six months subsequent to this exposure. main measurements: kaplan-meier curves were plotted to describe the weaning process and log-rank tests were used to assess statistical differences among survival curves. hazard ratio (hr) estimates were calculated by fitting cox proportional hazard regression models to the data. results: the increases in estimated, adjusted rates for children born in hospitals with trained personnel were 29% (hr = 0.71) and 20% (hr = 0.80) for exclusive and full breastfeeding, respectively. no changes were identified for total breastfeeding. conclusion: this randomized trial supports a growing body of evidence that training hospital health professionals in breastfeeding promotion and protection results in an increase in breastfeeding duration.