A ventilator intended to be connected to a patient for breathing therapy has a control unit having an input for receiving EMG signals from an EMG detector and an output for an EMG based control signal and a pneumatic unit for generating breathing gas flows dependent on the EMG based control signal is described. The ventilator has a detector for determining a parameter related to breathing dynamics for the patient, this detector being connected to the control unit and control unit controlling the pneumatic unit dependent on the parameter related to breathing dynamics in the case of loss of EMG signals at the input.