Breastfeeding is fundamental for child health. Changes in the duration of breastfeeding are compared for three population-based cohorts of children born in 1982, 1993 and 2004 in the city of Pelotas, Southern Brazil. Samples of the 1982 and 1993 children and all of the children from the 2004 cohort study were sought at home when they were aged around 12 months. Both the duration of breastfeeding and the stage at which different kind of foods were regularly introduced were investigated. The median duration of breastfeeding increased from 3.1 to 6.8 months in this period. Exclusive breastfeeding at three months was practically non-existent in 1982 and had reached one third of infants by 2004. The increase was faster after 1993, suggesting an important impact made by promotion activities. Up to about 6-9 months, breastfeeding was more prevalent in high-income families, but after this age it became more common among the poor. Low birth weight babies were breastfeed for shorter durations. The duration of breastfeeding is still far short of international recommendations, justifying further campaigns. Special attention should be given to low birth weight babies and those from low-income families.