BACKGROUND: Middle-income countries will need to drastically reduce neonatal deaths to achieve the Millennium Development Goal for child survival. The evolution of antenatal and perinatal care indicators in the Brazilian city of Pelotas from 1982 to 2004 provides a useful case study of potential challenges. METHODS: We prospectively studied three birth cohorts representing all urban births in 1982, 1993, and from January to July, 2004. The same methods were used in all three studies. FINDINGS: Despite improvements in maternal characteristics, prevalence of preterm births increased from 6.3% (294 of 4665) in 1982 to 16.2% (342 of 2112) in 2004, corresponding to a 47 g reduction in mean birthweight. Average number of antenatal visits in 2004 was 8.3 per woman, but quality of care was still inadequate--97% of women had an ultrasound scan, but only 1830 (77%) had a vaginal examination and 559 of 1748 non-immunised women did not receive tetanus toxoid. Rate of caesarean sections increased greatly, from 28% (1632 of 5914) in 1982 to 43% (1039 of 2403) in 2004, reaching 374 of 456 (82%) of all private deliveries in 2004. The increased rate of preterm births seemed to result largely from caesarean sections or inductions. Newborn care improved, and gestational-age-specific mortality rates had fallen by about 50% since 1982. As a result, neonatal mortality rates had been stable since 1990, despite the increase in preterm deliveries. INTERPRETATION: Excessive medicalisation--including labour induction, caesarean sections, and inaccurate ultrasound scans--led by an unregulated private sector with spill-over effects to the public sector, might offset the gains resulting from improved maternal health and newborn survival. These challenges will have to be faced by middle-income countries striving to achieve the child survival Millennium Development Goal.