Background and Aim The beneficial effect of improving air quality on lung function development in children remains understudied. We assessed associations of changes in ambient air pollution levels with lung function growth from childhood until young adulthood in a Swedish cohort study. Methods In the prospective birth cohort BAMSE (Children, Allergy, Milieu, Stockholm Epidemiology), spirometry was conducted at the 8-year (2002-2004), 16-year (2011-2013) and 24-year follow-ups (2016-2019). Participants with one spirometry measurement at 8 years and at least one another measurement in subsequent follow-ups were included (1509 participants with 3837 spirometry measurements). Ambient air pollution levels (particulate matter≤2.5 μm [PM2.5], particulate matter≤10 μm [PM10], black carbon [BC] and nitrogen oxides [NOx]) at residential addresses during the lifetime were estimated using dispersion modelling. Linear mixed-effect models were used to estimate the association between air pollution level change and lung function development. Results Overall, individual air pollution levels decreased progressively during the study period. For example, median (interquartile range, IQR) of PM2.5 decreased from 8.2 (0.92) μg/m3 during 2002-2004 to 5.22 (0.67) μg/m3 during 2016-2019. Reduction of air pollution exposure was associated with higher rate of growth for both FEV1 and FVC. For each IQR decrease in PM2.5, the growth rate increased by 3.7 ml/year (95%CI: 1.3-6.0, P<0.001) for FEV1 and 7.9 ml/year (95%CI:4.3-11.4, P<0.001) for FVC. Significant associations with lung function growth were also observed for reduction of PM10, BC and NOx. These associations persisted after adjustment for potential confounders. The beneficial effect from improved air quality was not statistically modified by asthma, allergic sensitization, early-life air pollution exposure or dietary intake of antioxidants. Conclusions Long-term reduction of air pollution is associated with positive lung function development from childhood to young adulthood. Keywords: air pollution, lung function, spirometry, improved air quality, cohort