Summary In infants most previous studies of the hypoxic ventilatory response (HVR) have been conducted only during quiet sleep (QS) and arousal responses have not been considered. Our aim was to quantify the maturation of the HVR in term infants during both active sleep (AS) and QS over the first 6 months of life. Daytime polysomnography was performed on 15 healthy term infants at 2–5 weeks, 2–3 and 5–6 months after birth and infants were challenged with hypoxia (15% O2, balance N2). Tests in AS always resulted in arousal; in QS tests infants either aroused or did not arouse. A biphasic HVR was observed in non arousing tests at all three ages studied. The fall in SpO2 was more rapid in arousal tests at all three ages. At 2–5 weeks, in non-arousing QS tests, there was a greater fall in respiratory frequency (f) despite a smaller fall in SpO2 compared with 2–3 and 5–6 months. When infants aroused there was no difference in the HVR between sleep states or with postnatal age. However, when infants failed to arouse from QS, arterial desaturation was less in the younger infants despite a poorer HVR. We suggest that arousal in response to hypoxia, particularly in AS, is a vital survival mechanism throughout the first 6 months of life.