An apparatus for heating a medical fluid includes a fluid passage for delivering the medical fluid, a heating element for heating the medical fluid, and a detector. The detector has a first detector for detecting a parameter which correlates with a flow rate of the medical fluid, or a second detector for detecting a parameter which corresponds to a set point, for the flow rate of the medical fluid. A controller controls regulates a temperature of the medical fluid in the fluid passage and a temperature of the heating element, and a switching circuit switches the controller between controlling or regulating the temperature of the medical fluid and controlling or regulating the temperature of the heating element. The switching circuit is configured such that the switching is triggered in response to the switching circuit detecting that the flow rate falls below or exceeds a predetermined flow rate threshold value.