Apparatus, comprising: a probe having a distal end comprising a temperature sensor and a transducer configured for contact with tissue in a body of a living subject; a power supply configured to deliver electrical power to the transducer, so as to ablate the tissue; and a controller, coupled to the power supply and to the probe, and configured: to receive a signal from the temperature sensor and in response to the signal to output an indication of a temperature of the tissue, during a first preselected time period to activate the power supply to deliver no more than a first target power to the transducer so as to ablate the tissue, and to reduce the electrical power delivered to the transducer when a first maximum allowable temperature of the tissue is exceeded, during a preselected transition time period immediately following the first time period, to activate the power supply to deliver no more than a second target power, less than the first target power, to the transducer so as to ablate the tissue, while reducing the delivered power when the first maximum allowable temperature of the tissue is exceeded, and during a second preselected time period immediately following the transition time period, to activate the power supply to deliver no more than the second target power to the transducer, while reducing the delivered power when a second maximum allowable temperature, less than the first maximum allowable temperature, is exceeded. a probe having a distal end comprising a temperature sensor and a transducer configured for contact with tissue in a body of a living subject; a power supply configured to deliver electrical power to the transducer, so as to ablate the tissue; and a controller, coupled to the power supply and to the probe, and configured: to receive a signal from the temperature sensor and in response to the signal to output an indication of a temperature of the tissue, during a first preselected time period to activate the power supply to deliver no more than a first target power to the transducer so as to ablate the tissue, and to reduce the electrical power delivered to the transducer when a first maximum allowable temperature of the tissue is exceeded, during a preselected transition time period immediately following the first time period, to activate the power supply to deliver no more than a second target power, less than the first target power, to the transducer so as to ablate the tissue, while reducing the delivered power when the first maximum allowable temperature of the tissue is exceeded, and during a second preselected time period immediately following the transition time period, to activate the power supply to deliver no more than the second target power to the transducer, while reducing the delivered power when a second maximum allowable temperature, less than the first maximum allowable temperature, is exceeded. to receive a signal from the temperature sensor and in response to the signal to output an indication of a temperature of the tissue, during a first preselected time period to activate the power supply to deliver no more than a first target power to the transducer so as to ablate the tissue, and to reduce the electrical power delivered to the transducer when a first maximum allowable temperature of the tissue is exceeded, during a preselected transition time period immediately following the first time period, to activate the power supply to deliver no more than a second target power, less than the first target power, to the transducer so as to ablate the tissue, while reducing the delivered power when the first maximum allowable temperature of the tissue is exceeded, and during a second preselected time period immediately following the transition time period, to activate the power supply to deliver no more than the second target power to the transducer, while reducing the delivered power when a second maximum allowable temperature, less than the first maximum allowable temperature, is exceeded.