The transition to extra-uterine life at birth is critically dependent on airway liquid clearance to allow the entry of air and the onset of gaseous ventilation. We have used phase contrast X-ray imaging to identify factors that regulate lung aeration at birth in spontaneously breathing term and mechanically ventilated preterm rabbit pups. Phase contrast X-ray imaging exploits the difference in refractive index between air and water to enhance image contrast, enabling the smallest air-filled structures of the lung (alveoli; <100 microm) to be resolved. Using this technique, the lungs become visible as they aerate, allowing the air-liquid interface to be observed as it moves distally during lung aeration. Spontaneously breathing term rabbit pups rapidly aerate their lungs, with most fully recruiting their functional residual capacity (FRC) within the first few breaths. The increase in FRC occurs mainly during individual breaths, demonstrating that airway liquid clearance and lung aeration is closely associated with inspiration. We suggest that transpulmonary pressures generated by inspiration provide a hydrostatic pressure gradient for the movement of water out of the airways and into the surrounding lung tissue after birth. In mechanically ventilated preterm pups, lung aeration is closely associated with lung inflation and a positive end-expiratory pressure is required to generate and maintain FRC after birth. In summary, phase contrast X-ray imaging can image the air-filled lung with high temporal and spatial resolution and is ideal for identifying factors that regulate lung aeration at birth in both spontaneously breathing term and mechanically ventilated preterm neonates.