Purpose The relative contributions of factors influencing lung injury immediately after birth are poorly understood. We hypothesized that oxygen content and humidity of inspired air would influence markers of pulmonary inflammation in ventilated lambs. Methods Lambs delivered at 140 days gestation (term = 150 days) were assigned to one of five groups (n = 5–6/group): unventilated controls, or ventilation with 21 or 100% O2 that was either heated and humidified or cold and dry. Lambs were ventilated gently for 3 h: blood gases were recorded regularly. Bronchoalveolar lavage and samples of tracheal mucosa and lung were collected post mortem. Results Arterial pH was lower [mean difference (95% CI): −0.07 (−0.13, −0.03)], while there was an increase in PaCO2 [mean difference (95% CI): 10.2 (2.4, 17.9)] and fold change in lung pro-inflammatory IL-1β cytokine mRNA [mean difference (95% CI): 28.3 (0.3, 56.2)] or IL-8 [mean difference (95% CI): 27.8 (7.9, 47.7)] cytokine mRNA expression with 100% O2 relative to 21% O2. Cold dry inspired gas did not influence gas exchange or dynamic mechanics at 3 h compared to heated humidified gas. Compared to 100% inspired O2, cold dry inspired gas had less marked effect on fold change in lung pro-inflammatory IL-1β cytokine mRNA [mean difference (95% CI): 27.2 (−0/8, 55.1)] or IL-8 [mean difference (95% CI): 14.5 (5.5, 34.4)] cytokine mRNA expression, although cilial dysfunction/damage was evident on electron microscopy, especially when exposure to cold dry gas was combined with hyperoxia. Conclusions In near-term neonatal lambs ventilated for 3 h, hyperoxia was associated a more powerful stimulus for pulmonary dysfunction and upregulation of inflammatory cytokines than cold dry gas.