OBJECTIVE: To generate evidence on the effectiveness of household-wide treatment for preventing the transmission of pediculosis capitis (head lice) in resource-poor communities. METHODS: We studied 132 children without head lice who lived in a slum in north-eastern Brazil. We randomized the households of the study participants into an intervention and a control group and prospectively calculated the incidence of infestation with head lice among the children in each group. In the intervention group, all of the children's family members who lived in the household were treated with ivermectin; in the control group, no family member was treated. We used the chi(2) test with continuity correction or Fisher's exact test to compare proportions. We performed survival analysis using Kaplan-Meier estimates with log rank testing and the Mann-Whitney U test to analyse the length of lice-free periods among sentinel children, and we used Cox regression to analyse survival data on a multivariate level. We also carried out a subgroup analysis based on gender. FINDINGS: Children in the intervention group remained free from infestation with head lice significantly longer than children in the control group. The median infestation-free period in the intervention group was 24 days (interquartile range, IQR: 11-45), as compared to 14 days (IQR: 11-25) in the control group (P = 0.01). Household-wide treatment with ivermectin proved significantly more effective among boys than among girls (P = 0.005). After treatment with ivermectin, the estimated number of annual episodes of head lice infestation was reduced from 19 to 14 in girls and from 15 to 5 in boys. Female sex and extreme poverty were independent risk factors associated with a shortened disease-free period. CONCLUSION: In an impoverished community, girls and the poorest of the poor are the population groups that are most vulnerable for head lice infestation. To decrease the number of head lice episodes per unit of time, control measures should include the treatment of all household contacts. Mass treatment with ivermectin may reduce the incidence of head lice infestation and associated morbidity in resource-poor communities.