Methods and apparatus for detecting the occurrence of a potential or actual overpressure during assisted ventilation are described. A blower suppliespressurized gas to a conduit, and in turn to a patient mask for connection with the entrance of a patient's airways. A pressure sensor detects the delivered pressure in the mask, which is provided to a controller. The controller has operation over the blower by way of a servo and motor. The controller determines a relatively longterm average of the pressure signal, and compares it against a threshold value. If the threshold value is approached or exceeded, the controller controls the blower 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.