It is uncertain whether individualisation of the perioperative open-lung approach (OLA) to ventilation reduces postoperative pulmonary complications in patients undergoing lung resection. We compared a perioperative individualised OLA (iOLA) ventilation strategy with standard lung-protective ventilation in patients undergoing thoracic surgery with one-lung ventilation. This multicentre, randomised controlled trial enrolled patients scheduled for open or video-assisted thoracic surgery using one-lung ventilation in 25 participating hospitals in Spain, Italy, Turkey, Egypt, and Ecuador. Eligible adult patients (age ≥18 years) were randomly assigned to receive iOLA or standard lung-protective ventilation. Eligible patients (stratified by centre) were randomly assigned online by local principal investigators, with an allocation ratio of 1:1. Treatment with iOLA included an alveolar recruitment manoeuvre to 40 cm H2O of end-inspiratory pressure followed by individualised positive end-expiratory pressure (PEEP) titrated to best respiratory system compliance, and individualised postoperative respiratory support with high-flow oxygen therapy. Participants allocated to standard lung-protective ventilation received combined intraoperative 4 cm H2O of PEEP and postoperative conventional oxygen therapy. The primary outcome was a composite of severe postoperative pulmonary complications within the first 7 postoperative days, including atelectasis requiring bronchoscopy, severe respiratory failure, contralateral pneumothorax, early extubation failure (rescue with continuous positive airway pressure, non-invasive ventilation, invasive mechanical ventilation, or reintubation), acute respiratory distress syndrome, pulmonary infection, bronchopleural fistula, and pleural empyema. Due to trial setting, data obtained in the operating and postoperative rooms for routine monitoring were not blinded. At 24 h, data were acquired by an investigator blinded to group allocation. All analyses were performed on an intention-to-treat basis. This trial is registered with ClinicalTrials.gov, NCT03182062, and is complete. Between Sept 11, 2018, and June 14, 2022, we enrolled 1380 patients, of whom 1308 eligible patients (670 [434 male, 233 female, and three with missing data] assigned to iOLA and 638 [395 male, 237 female, and six with missing data] to standard lung-protective ventilation) were included in the final analysis. The proportion of patients with the composite outcome of severe postoperative pulmonary complications within the first 7 postoperative days was lower in the iOLA group compared with the standard lung-protective ventilation group (40 [6%] vs 97 [15%], relative risk 0·39 [95% CI 0·28 to 0·56]), with an absolute risk difference of -9·23 (95% CI -12·55 to -5·92). Recruitment manoeuvre-related adverse events were reported in five patients. Among patients subjected to lung resection under one-lung ventilation, iOLA was associated with a reduced risk of severe postoperative pulmonary complications when compared with conventional lung-protective ventilation. Instituto de Salud Carlos III and the European Regional Development Funds.