NOVELTY - The digester (30) for anaerobic treatment of organic wastes (36), comprises a part forming a tank (31) to contain the organic wastes and housing a movable agitator, a part (33) forming a roof for closing the tank, an overflow unit, a protection unit, and an extraction unit. The roof forming part has a first portion traversing through a passage opening (34) of the agitator. The agitator comprises a unit for confinement of the biogas inside the digester during and after extraction of the movable agitator. The confinement unit defines an internal space (35).    USE - The digester is useful for anaerobic treatment of organic wastes for the production of biogas and digestate.    ADVANTAGE - The digester ensures safe, reliable, economic, simple and effective treatment of organic wastes anaerobically thus capable of efficiently producing the biogas and digestate in large-scale, does not require frequent cleaning and maintenance, and prevents the formation of an explosive gas mixture at its opening.    DETAILED DESCRIPTION - The digester (30) for anaerobic treatment of organic wastes (36), comprises a part forming a tank (31) to contain the organic wastes and housing a movable agitator, a part (33) forming a roof for closing the tank, an overflow unit, a protection unit, and an extraction unit. The roof forming part has a first portion traversing through a passage opening (34) of the agitator. The agitator comprises a unit for confinement of the biogas inside the digester during and after extraction of the movable agitator. The confinement unit: defines an internal space (35) for the confinement of biogas between a surface defined by an upper level affected by the waste inside the digester and the roof forming part; and comprises a tubular element extending from the opening in a bottom direction of the digester, and a raised portion formed in the roof forming part. The element has a lower end in contact with the organic waste. The raised portion defines an internal confinement space with the surface defined by the upper level. The upper level extends along the first portion. Upper part of the overflow unit extends along a lower part of the tubular element, and lower part of the overflow unit extends outside the digester. The raised portion extends on a fraction of a transverse section of the tank forming part. The protection unit comprises a valve connected with the internal confinement space outside the digester. The extraction unit is arranged for extracting the biogas contained in the internal confinement space, and comprises an anti-foam pot.    DESCRIPTION OF DRAWING(S) - The figure shows a sectional view of the assembly of a tank and a roof of a digester.    Digester (30)    Tank (31)    Roof forming part (33)    Opening (34)    Internal confinement space (35)    Organic wastes. (36)