Background: Long-term azithromycin (AZM) therapy is increasingly used to prevent acute exacerbations of chronic lung diseases (CLD). However, selection for resistance to macrolides and other antibiotics remains a concern. We investigated the impact of 48 weeks of AZM therapy on the carriage and antibiotic resistance of common respiratory bacteria in children and adolescents with HIV-associated CLD. Methods: Nasopharyngeal (NP) swabs and sputa were collected at baseline, 48 and 72 weeks from children and adolescents with HIV-associated CLD randomised to receive weekly AZM or placebo for 48 weeks and followed post-intervention up to 72 weeks. The primary outcomes were the prevalence of Streptococcus pneumoniae (SP), Staphylococcus aureus (SA), Haemophilus influenzae (HI), and Moraxella catarrhalis (MC) and their antibiotic resistance between the trial arms at 48 and 72 weeks. Mixed-effects logistic regression and Fisher's exact test were used to compare carriage and resistance, respectively. Findings: Between June 2016, and September 2018, 347 participants (174 AZM, 173 placebo arm) were enrolled (median age, 15 years [IQR = 13–18], females, 49%). NP carriage was significantly lower in the AZM compared to placebo arm at 48 weeks for SP (18% [29/159] vs 41% [64/153], adjusted odds ratio (aOR) 0·2 [95% CI 0·1–0·4]), HI (7% [11/159] vs 16% [24/153], aOR 0·3 [0·1–0·8]), or MC (4% [7/159] vs 11% [17/153], aOR 0·3 [0·1–0·8]). SP resistance to AZM (62% [18/29] vs 13% [8/63], p <0·0001) or tetracycline (60% [18/29] vs 21% [13/63], p <0·0001) were higher in the AZM arm at 48 weeks. Although, carriage of SA did not differ between the two arms, carriage of SA resistant to AZM (NP= 91% [31/34] vs 3% [1/31], p <0·0001), tetracycline (NP= 35% [12/34] vs 13% [4/31], p = 0·05) or clindamycin (NP= 79% [27/34] vs 3% [1/31], p <0·0001) was significantly higher in the AZM arm at 48 weeks and persisted at 72 weeks. The above observations were mirrored in sputum samples. Interpretation: Long-term AZM reduced carriage of SP, HI and MC but promoted antibiotic resistance in SP and SA; antibiotic-resistant SA persisted at 72 weeks from randomisation. This risk of drug resistance should be taken into account when long-term AZM therapy is being considered. Trial Registration: The trial registration number is ClinicalTrials.gov Identifier: NCT02426112 Funding: The Global Health and Vaccination Research (GLOBVAC) Programme of the Medical Research Council of Norway Declaration of Interest: None declared. Ethical Approval: Approval for the main trial was obtained from local regulatory bodies at the study sites and the research ethics committees of the London School of Hygiene and Tropical Medicine, the University of Cape Town, and the Medical and Health Research in Norway. This sub-study was approved by the Human Research Ethics Committee of the University of Cape Town (HREC/REF: 092/2019).