A method of treating in a reactor an effluent comprising ammonium ions, said method comprising: - at least one cycle comprising the following steps: (a) a step, hereinafter called "supplying step", of supplying said reactor with said effluent, (b) a step, hereinafter called "aeration step", to cause aerobic nitrification of ammonium ions wherein the reactor is aerated, and (c) a step, hereinafter called "non aeration step", to cause anoxic denitrification wherein aeration is stopped, whereby a treated effluent is obtained and - (d) a step, hereinafter called "withdrawal step", of recovering the treated effluent from said reactor, wherein: - aeration step (b) comprises the steps of: - measuring, in said reactor, the concentration of dissolved oxygen in said effluent, - continuously calculating the value of the first derivative of the DO with respect to time (dDO/dt) - noting dDO/dt and - when dDO/dt reaches a first threshold value: - waiting for a predetermined time (T inter) and - stopping the aeration at the end of said T inter, - whereby the aeration step is terminated, and - non-aeration step (c) comprises steps of: - measuring, in said reactor, a redox potential of said effluent, - continuously calculating the value of the second derivative of the redox potential with respect to time (d 2 ORP/dt 2) - noting d 2 ORP/dt 2 and - when d 2 ORP/dt 2 reaches a second threshold value, terminating the non-aeration step (c). - at least one cycle comprising the following steps: (a) a step, hereinafter called "supplying step", of supplying said reactor with said effluent, (b) a step, hereinafter called "aeration step", to cause aerobic nitrification of ammonium ions wherein the reactor is aerated, and (c) a step, hereinafter called "non aeration step", to cause anoxic denitrification wherein aeration is stopped, whereby a treated effluent is obtained and (a) a step, hereinafter called "supplying step", of supplying said reactor with said effluent, (b) a step, hereinafter called "aeration step", to cause aerobic nitrification of ammonium ions wherein the reactor is aerated, and (c) a step, hereinafter called "non aeration step", to cause anoxic denitrification wherein aeration is stopped, - (d) a step, hereinafter called "withdrawal step", of recovering the treated effluent from said reactor, - aeration step (b) comprises the steps of: - measuring, in said reactor, the concentration of dissolved oxygen in said effluent, - continuously calculating the value of the first derivative of the DO with respect to time (dDO/dt) - noting dDO/dt and - when dDO/dt reaches a first threshold value: - waiting for a predetermined time (T inter) and - stopping the aeration at the end of said T inter, - whereby the aeration step is terminated, and - waiting for a predetermined time (T inter) and - stopping the aeration at the end of said T inter, - whereby the aeration step is terminated, - non-aeration step (c) comprises steps of: - measuring, in said reactor, a redox potential of said effluent, - continuously calculating the value of the second derivative of the redox potential with respect to time (d 2 ORP/dt 2) - noting d 2 ORP/dt 2 and - when d 2 ORP/dt 2 reaches a second threshold value, terminating the non-aeration step (c). - measuring, in said reactor, a redox potential of said effluent, - continuously calculating the value of the second derivative of the redox potential with respect to time (d 2 ORP/dt 2) - noting d 2 ORP/dt 2 and - when d 2 ORP/dt 2 reaches a second threshold value, terminating the non-aeration step (c).