A closed-loop control system has been developed to regulate automatically the partial pressure of arterial oxygen (PaO2) to a pre-set level in neonates with RDS (Respiratory Distress Syndrome). A microcomputer-based system is described which uses the PaO2 value from an indwelling umbilical artery electrode as the input to a robust control algorithm. The derived control signal is used to modify the position of a motor driven oxygen/air blender, thus regulating the percentage of oxygen delivered in the inspired gas mixture. The parameters of the control algorithm were conservatively chosen, and the safety aspects of the system are discussed. A total of 48 h of closed-loop control were recorded on seven pre-term infants with mild-to-moderate RDS being nursed in headboxes. Ten separate closed-loop control intervals were recorded, and overall the results showed a marked improvement over comparable periods of manual control. The percentage of time for which the recorded PaO2 was within +/- 1 kPa of the chosen target value (10 kPa) was 74.9 +/- 10.2% when averaged over the ten closed-loop control periods. The corresponding figure for the comparable manual control intervals was 45.2 +/- 16.0%.