Atelectasis after cardiopulmonary bypass (CPB) can affect right ventricular (RV) performance by increasing its outflow impedance. The aim of this study was to determine whether a lung recruitment manoeuvre improves RV function by re-aerating the lung after CPB. Randomised controlled study. Single-institution study, community hospital, Córdoba, Argentina. Forty anaesthetised patients with New York Heart Association class I or II, preoperative left ventricular ejection fraction at least 50% and Euroscore 6 or less scheduled for cardiac surgery with CPB. Patients were assigned to receive either standard ventilation with 6 cmH2O of positive end-expiratory pressure (PEEP; group C, n = 20) or standard ventilation with a recruitment manoeuvre and 10 cmH2O of PEEP after surgery (group RM, n = 20). RV function, left ventricular cardiac index (CI) and lung aeration were assessed by transoesophageal echocardiography (TOE) before, at the end of surgery and 30 min after surgery. RV function parameters and atelectasis assessed by TOE. Haemodynamic data and atelectasis were similar between groups before surgery. At the end of surgery, CI had decreased from 2.9 ± 1.1 to 2.6 ± 0.9 l min m in group C (P = 0.24) and from 2.8 ± 1.0 to 2.6 ± 0.8 l min m in group RM (P = 0.32). TOE-derived RV function parameters confirmed a mild decrease in RV performance in 95% of patients, without significant differences between groups (multivariate Hotelling t-test P = 0.16). Atelectasis was present in 18 patients in group C and 19 patients in group RM (P = 0.88). After surgery, CI decreased further from 2.6 to 2.4 l min m in group C (P = 0.17) but increased from 2.6 to 3.7 l min m in group RM (P < 0.001). TOE-derived RV function parameters improved only in group RM (Hotelling t-test P < 0.001). Atelectasis was present in 100% of patients in group C but only in 10% of those in group RM (P < 0.001). Atelectasis after CPB impairs RV function but this can be resolved by lung recruitment using 10 cmH2O of PEEP. Protocol started on October 2014.