Methods and apparatus for detecting the occurrence of a potential or actual overpressure during assisted ventilation are described. A blower (10) supplies pressurized gas to a conduit (12), and in turn to a patient mask (11) for connection with the entrance of a patient's airways. A pressure sensor (17, 18) detects the delivered pressure in the mask (11), which is provided to a controller (16). The controller (16) has operation over the blower (10) by way of a servo (19) and motor (20). The controller (16) determines a relatively longterm average of the pressure signal, and compares it against a threshold value (40). If the threshold value is approached or exceeded, the controller (16) controls the blower (10) and thus the supplied pressure to the patient. The effect of the control can be to limit or reduce the supplied gas pressure. The relatively longterm average can be of the order of minutes, or taken over ten or more breaths.