Apparatus for providing ventilatory assistance to a spontaneously breathing patient comprises processing means for computing a measure of the difference between a function of respiratory airflow over a period of time and a target value that is an alveolar ventilation which takes into account the patient's physiologic dead space, and a control mechanism (15) for causing a blower to deliver air to the patient at a pressure that is a function of said difference measure. The control mechanism (15) can operate a servo-controlled loop whose gain increases with the magnitude of said difference measure.