A method for detecting knocking provides for weighting or limitation of the knocking threshold. For this purpose, on the one hand a normal range of the reference level is defined and in the case of a deviation from this normal range the knocking threshold is multiplied by a weighting factor less than 1 and, alternatively, the knocking threshold is limited when a prescribable limit value is reached.