This paper reports a longitudinal study, conducted in 1989/90, of 1893 children aged 5 to 14 years in 9 poor urban areas of the city of Salvador (population 2·44 million), capital of Bahia State in northeast Brazil. Stool examinations were performed to measure nematode infection and reinfection 9 months after treatment, and an extensive questionnaire was applied to collect information on each child and on the conditions of the household. Comparison of areas with different levels of infrastructure showed the following trends as the level of community sanitation improved: clustering of cases by household became more significant, predisposition of individuals to reinfection and to heavy infection became more marked, and infections with different species were increasingly aggregated in the same individuals. These results suggest that sewerage and drainage can significantly reduce transmission of intestinal nematode infections in the public domain, but that other measures are required to control transmission within the household.