BackgroundHIV-1 transmission rates have been reduced over the last decade, an estimated 2 million new infections per year arise, including 220,000 paediatric cases. The main post-natal HIV exposure is through breastfeeding, where both its duration and modality (exclusive or not) are associated with postnatal transmission. The ANRS 12174 trial compared HIV-1 postnatal transmission of 2 prophylaxis drugs for infants during lactation (lamivudine and lopinavir-ritonavir). Our objective has been to examine the feeding practices and the determinants of exclusive/ predominant (EPBF) or any breastfeeding among the participants of this trial in Burkina Faso, South Africa, Uganda and Zambia.MethodsMothers infected with HIV-1 and their uninfected offspring were followed from day 7 after birth for 50 weeks, keeping monthly records of their feeding patterns. Feeding was classified into 3 categories: 1) exclusive breastfeeding during the first six months, only breast-milk being given to infant for 6 months, 2) predominant breastfeeding, breast-milk with liquid-based items being given, and 3) mixed feeding, other non-breast milk or solid food being given in addition to breast milk with or without liquid-based items. The categories were merged into 2 groups: EPBF applying to infants aged <6 months and mixed feeding applying to infants of any age. The feeding patterns have been given as Kaplan-Meier curves. A flexible parametric multiple regression model was used to identify the determinants of the mothers’ feeding behaviour.ResultsA total of 1,225 mother-infant pairs provided feeding data from Burkina Faso (N = 204), South Africa (N = 213), Uganda (N = 274) and Zambia (N = 534) between November 2009 and March 2013. The mean maternal age was 27.4 years and the mean BMI was 24.5. 57.7 and 93.9% of mothers initiated breastfeeding within the first hour and first day, respectively. Overall, the median durations of any form of breastfeeding and EPBF were 40.6, and 20.9 weeks, respectively. Babies randomized to the lopinavir/ritonavir group in South Africa tended to do less EPBF than those in the lamivudine group.Overall the group of mothers aged between 25 and 30 years, those married, employed or multiparous tended to stop early EPBF. Mothers living in Uganda or Zambia, those aged between 25 -30 years, better educated (at least secondary school level), employed or having undergone C-section stopped any breastfeeding early.ConclusionsThere is a need to improve breastfeeding and complementary feeding practices of children, particularly those exposed to HIV and anti-retrovirals, taking into account context and socio-demographic factors.Trial registrationClinical trial registration: NCT00640263.Electronic supplementary materialThe online version of this article (doi:10.1186/s13006-017-0112-2) contains supplementary material, which is available to authorized users.