A process for the production of biogas, comprising: i) a phase of anaerobic digestion of an organic substrate in a fermenter, by means of bacterial biomass, forming a digesting mass in said fermenter, wherein from said fermenter flow out: a biogas stream consisting of biogas, and at least one digesting stream comprising at least a fraction of the digesting mass; ii) a phase of separation of the digesting stream, wherein said digesting stream is conveyed to a separator, that separates a fibrous stream, comprising the fibrous fraction of the digesting stream, and a liquid stream of liquid digestate comprising the liquid fraction of the digesting stream and the bacterial biomass, and wherein said separator is sealed in order to minimize air contact; iii) a phase of recirculation of the fibrous stream to the fermenter, wherein said fibrous stream is substantially free from oxygen; iv) a phase of concentration of the bacterial biomass contained in the liquid stream by microfiltration, wherein: said liquid stream is conveyed periodically to at least a first tank maintained under the same anaerobic conditions and temperature of the fermenter from a further tank, that is placed between the separator and the first tank and is connected to a degritting circuit comprising a sand removal unit, wherein a degritting stream is withdrawn continuously from the further tank, conveyed to the degritting circuit for removal of the ashes, and then sent back to the further tank, removed of ashes; said first tank being connected to a microfiltration system comprising a microfiltration membrane, through which part of the liquid stream is microfiltered obtaining a first stream of filtered digestate substantially free from bacterial biomass, and part of the liquid stream is retained, obtaining a retained stream comprising the concentrated bacterial biomass that re-enters into the first tank; v) a phase of recirculation of the bacterial biomass to the fermenter, wherein a recirculating stream comprising the bacterial biomass flows out of the first tank and is recirculated to the fermenter. i) a phase of anaerobic digestion of an organic substrate in a fermenter, by means of bacterial biomass, forming a digesting mass in said fermenter, wherein from said fermenter flow out: a biogas stream consisting of biogas, and at least one digesting stream comprising at least a fraction of the digesting mass; ii) a phase of separation of the digesting stream, wherein said digesting stream is conveyed to a separator, that separates a fibrous stream, comprising the fibrous fraction of the digesting stream, and a liquid stream of liquid digestate comprising the liquid fraction of the digesting stream and the bacterial biomass, and wherein said separator is sealed in order to minimize air contact; iii) a phase of recirculation of the fibrous stream to the fermenter, wherein said fibrous stream is substantially free from oxygen; iv) a phase of concentration of the bacterial biomass contained in the liquid stream by microfiltration, wherein: said liquid stream is conveyed periodically to at least a first tank maintained under the same anaerobic conditions and temperature of the fermenter from a further tank, that is placed between the separator and the first tank and is connected to a degritting circuit comprising a sand removal unit, wherein a degritting stream is withdrawn continuously from the further tank, conveyed to the degritting circuit for removal of the ashes, and then sent back to the further tank, removed of ashes; said first tank being connected to a microfiltration system comprising a microfiltration membrane, through which part of the liquid stream is microfiltered obtaining a first stream of filtered digestate substantially free from bacterial biomass, and part of the liquid stream is retained, obtaining a retained stream comprising the concentrated bacterial biomass that re-enters into the first tank; v) a phase of recirculation of the bacterial biomass to the fermenter, wherein a recirculating stream comprising the bacterial biomass flows out of the first tank and is recirculated to the fermenter.