Breathing movements are directed both reflexly by neurons in the medulla and pons and behaviorally through cortical and limbic neurons. The two modes of control have afferent and efferent interconnections and interact continuously but their relative influences shift considerably through the sleep-waking cycle. In an awaked state behavioral control prevents apnea and by itself is able to maintain normal blood gas tensions except during exercise above the anerobic threshold. During sleep the maintenance of breathing depends on input from chemoreceptors. If apnea should occur during sleep, this is regularly followed by arousal so as to return the control of breathing to the behavioral system.