Anaemia in children is a public health concern in Mexico; Federal food assistance programmes are being implemented to prevent it. We undertook this research to investigate the indirect association between food assistance programmes (FAP) and anaemia through dietary and socio-economic conditions of beneficiary children. A structural equation model (SEM) was constructed to assess associations among FAP, dietary and socio-economic conditions, as well as anaemia. A cross-sectional comparative study was conducted based on a sample of 1214 households with children <5 years old, beneficiaries of two FAP: Prospera and rescue from malnutrition with amaranth (RMA) and a comparison group in San Luis Potosí, Mexico. The SEM and a decomposition effect analysis revealed the existence of a significant indirect association of FAP on the prevalence of anaemia via dietary and socio-economic conditions in children under 5 years old. The Prospera assistance programme showed a significant indirect positive association with the prevalence of anaemia (standard coefficient=0·027, P<0·031), and the RMA programme showed a significant indirect negative association with the prevalence of anaemia (standard coefficient=−0·029, P=0·047). There was a direct association between FAP and dietary and socio-economic conditions. FAP could indirectly modify the prevalence of anaemia in young children with a direct improvement on dietary and socio-economic conditions. The unexpected finding of the association between RMA, dietary and socio-economic conditions and the prevalence of anaemia reflects differences in the focus of the programmes.