A method for desulfuration of a digestate and a biogas in a digester for urban and/or agricultural and/or industrial effluents, by wet and/or dry route, the digester consisting of a chamber which is closed at the top and in which anaerobic digestion of a mass of products to be treated takes place, forming the digestate with a gas space above the digestate, from which the biogas is withdrawn, the digester comprising at least one external digestate recirculation loop, said method being wherein: - a digestate withdrawal point is situated in the lower part of the digester, and the digestate is reinjected at a point at a liquid level higher than the withdrawal point, - at at least one point (13, 14) of the digestate recirculation loop, a gaseous or liquid oxidant is injected, the injection conditions being as follows: - a circulation rate of the digestate in the loop is at least 0.6 m/s, preferably at least 1 m/s, to prevent the deposition of sulfur on the walls of the lines in line in recirculation loop, - a contact time between the injected oxidant and the recirculated digestate, from the point (13, 14) of injection of the oxidant to a point of reintroduction of the digestate in the chamber, is at least 15 seconds for all of the oxidant to be dissolved in a liquid phase of the digestate, - the amount of oxygen injected into the recirculation loop corresponds to the amount that would produce an equivalent oxygen concentration of less than or equal to 0.65 X to prevent a presence of oxygen in the biogas, and correspond to the amount that would produce an equivalent oxygen concentration of greater than or equal to 0.20 X to remove hydrogen sulfide from the biogas, where X is the saturation concentration of oxygen in pure water, estimated at the temperature and pressure of the recirculation loop, a sulfur produced remaining in the form of particles which are dispersed in the digestate and being removed together with the digestate. - a digestate withdrawal point is situated in the lower part of the digester, and the digestate is reinjected at a point at a liquid level higher than the withdrawal point, - at at least one point (13, 14) of the digestate recirculation loop, a gaseous or liquid oxidant is injected, the injection conditions being as follows: - a circulation rate of the digestate in the loop is at least 0.6 m/s, preferably at least 1 m/s, to prevent the deposition of sulfur on the walls of the lines in line in recirculation loop, - a contact time between the injected oxidant and the recirculated digestate, from the point (13, 14) of injection of the oxidant to a point of reintroduction of the digestate in the chamber, is at least 15 seconds for all of the oxidant to be dissolved in a liquid phase of the digestate, - the amount of oxygen injected into the recirculation loop corresponds to the amount that would produce an equivalent oxygen concentration of less than or equal to 0.65 X to prevent a presence of oxygen in the biogas, and correspond to the amount that would produce an equivalent oxygen concentration of greater than or equal to 0.20 X to remove hydrogen sulfide from the biogas, where X is the saturation concentration of oxygen in pure water, estimated at the temperature and pressure of the recirculation loop,