Abstract: A method and a device for controlling a process for burning lime containing mixture (CaCO3) and converting it to calcinated lime (CaO) in a rotary kiln, the rotary kiln having an elongated cavity surrounded by a wall and a burner arranged to heat the cavity. The method includes collecting measurement data of the temperature in the wall at a plurality of measuring points along the longitudinal axis of the cavity, predicting the actual temperature gradient along the longitudinal axis of the cavity based at least on the measurement data of the temperature in the wall, and by means of a thermal model describing the temperature along the cavity of the kiln, determining a desired temperature gradient along the cavity based on the predicted temperature gradient along the cavity and a predetermined control strategy controlling the temperature in the kiln.