Long-term effects of early, recurrent human exposure to general anaesthesia remain unknown. The Australasian Cystic Fibrosis Bronchoalveolar Lavage (ACFBAL) trial provided an opportunity to examine this issue in children randomly assigned in infancy to either repeated bronchoalveolar-lavage (BAL)-directed therapy with general anaesthesia or standard care with no planned lavages up to 5 years of age when all children received BAL-directed therapy under general anaesthesia. This multicentre, randomised, open-label phase 4 trial (CF-GAIN) used the original ACFBAL trial randomisation at 3·6 months (SD 1·6) to BAL-directed therapy or standard-care groups to assess the impact of general anaesthesia exposures over early childhood. Children who completed the ACFBAL trial, with a mean age of 5·1 (SD 0·18) years, received standardised neurobehavioural and health-related-quality-of-life assessment and brain MRI scans between Oct 8, 2013, and June 30, 2017, at a mean age of 12·8 (SD 1·7) years at three hospitals in Australia and one hospital in New Zealand. The primary outcome was a composite score of performance on a standardised, computer-based assessment of child attention, processing speed, and response inhibition skills (Conners Continuous Performance test, second edition). Secondary outcomes included intellectual function, other neurobehavioural measures, and brain imaging as an exploratory outcome. The trial was registered with the Australian New Zealand Clinical Trials Registry (ACTRN 12613000057785) and is completed. At 2 years, the BAL-directed therapy group (n=52) and standard-care group (n=45) had a median of 2·0 (IQR 1·0-3·0) and 0·0 (0·0-0·0) exposures, respectively. At completion of the ACFBAL trial, the BAL-directed therapy group had a median of 6·0 (4·0-9·5) exposures and the standard-care group 2·0 (1·0-4·0) exposures. At CF-GAIN completion, the BAL-directed therapy group had a median of 10·0 (IQR 6·5-14·5) exposures and the standard-care group 4·0 (3·0-7·0) exposures. Cumulative general anaesthesia exposure time was not prospectively collected but, for those with complete cumulative exposure time data to the end of the ACFBAL trial, the median cumulative exposure time for the BAL-directed therapy group (n=29) was 180 (IQR 140-285) min and for the standard-care group (n=32) was 48 (30-122) min. The mean Conners Continuous Performance test, second edition composite score was 51 (SD 8·1) in BAL-directed therapy group and 53 (8·8) in the standard-care group; difference -1·7 (95% CI -5·2 to 1·7; p=0·32) with similar performance on other neurobehavioural measures, including measures of executive function, intellectual quotient scores, and brain imaging. Our findings suggest that repeated general anaesthesia exposure in young children with cystic fibrosis is not related to functional impairment in attention, intellectual quotient, executive function, or brain structure compared with a group with fewer and shorter cumulative anaesthesia durations. National Health and Medical Research Council Australia, Queensland Government Health Service and Clinical Innovation Fellowship, and the Children's Hospital Foundation Queensland.