ABSTRACT: BACKGROUND:Children exposed to HIV have a high prevalence of stunting and anaemia. We aimed to test the effect of improved infant and young child feeding (IYCF) and improved water, sanitation, and hygiene (WASH) on child linear growth and haemoglobin concentrations. METHODS:We did a cluster randomised 2 × 2 factorial trial in two districts in rural Zimbabwe. Women were eligible for inclusion if they permanently lived in the trial clusters (ie, the catchment area of between one and four village health workers employed by the Zimbabwean Ministry of Health and Child Care) and were confirmed pregnant. Clusters were randomly allocated to standard of care (52 clusters); IYCF (20 g small-quantity lipid-based nutrient supplement daily for infants from 6 months to 18 months, complementary feeding counselling with context-specific messages, longitudinal delivery, and reinforcement; 53 clusters); WASH (ventilated, improved pit latrine, two hand-washing stations, liquid soap, chlorine, play space, and hygiene counselling; 53 clusters); or IYCF plus WASH (53 clusters). Participants and fieldworkers were not masked. Our co-primary outcomes were length for age Z score and haemoglobin in infants at 18 months of age. Here, we report these outcomes in the HIV-exposed children, analysed by intention to treat. We estimated the effects of the interventions by comparing the two IYCF groups with the two non-IYCF groups and the two WASH groups with the two non-WASH groups, except for outcomes with an important statistical interaction between the interventions. The trial is registered at ClinicalTrials.gov (NCT01824940) and is now complete. FINDINGS:Between Nov 22, 2012, and March 27, 2015, 726 HIV-positive pregnant women were included in the trial. 668 children were evaluated at 18 months (147 from 46 standard of care clusters; 147 from 48 IYCF clusters; 184 from 44 WASH clusters; 190 from 47 IYCF plus WASH clusters). Of the 668 children, 22 (3%) were HIV-positive, 594 (89%) HIV-exposed uninfected, and 52 (8%) HIV-unknown. The IYCF intervention increased mean length for age Z score by 0·26 (95% CI 0·09-0·43; p=0·003) and haemoglobin concentration by 2·9 g/L (95% CI 0·90-4·90; p=0·005). 165 (50%) of 329 children in the non-IYCF groups were stunted, compared with 136 (40%) of 336 in the IYCF groups (absolute difference 10%, 95% CI 2-17); and the prevalence of anaemia was also lower in the IYCF groups (45 [14%] of 319) than in the non-IYCF groups (24 [7%] of 329; absolute difference 7%, 95% CI 2-12). The WASH intervention had no effect on length or haemoglobin concentration. There were no trial-related adverse or serious adverse events. INTERPRETATION:Since HIV-exposed children are particularly vulnerable to undernutrition and responded well to improved complementary feeding, IYCF interventions could have considerable benefits in areas of high antenatal HIV prevalence. However, elementary WASH interventions did not lead to improvements in growth. FUNDING:Bill & Melinda Gates Foundation, UK Aid, Wellcome Trust, Swiss Development Cooperation, US National Institutes of Health, and UNICEF.