The effects of continuous positive airway pressure (CPAP) on pulmonary function during weaning from ventilator treatment were examined immediately after extubation in 17 very preterm infants, who had been ventilator-treated because of hyaline membrane disease (15 infants) and chronic pulmonary insufficiency of prematurity (two infants). Seven infants had bronchopulmonary dysplasia. Median birthweight was 920 g and median gestational age 26 completed weeks. The median duration of ventilator treatment was 10 days. Application of CPAP by means of a face chamber device after endotracheal extubation significantly lowered the frequency of apnea (P = 0.02) and enhanced oxygenation (P = 0.001). The respiratory mechanical indices derived from flow rate and juxta-diaphragmatic esophageal pressure measurements showed a reduced elastic (P = 0.03) and resistive (P = 0.02) load on the diaphragm. Even if the measured values do not accurately represent absolute resistances and compliances, the relative values of end-inspiratory and end-expiratory pressures differed significantly with and without CPAP (P = 0.001 and 0.002, respectively). We found CPAP applied via the face chamber technique immediately after extubation to be beneficial and to facilitate weaning from ventilator treatment in very preterm infants.