Method for treating a fluid aqueous waste stream comprising a biodegradable organic substance, comprising - feeding the aqueous waste stream into a bioreactor containing a fluid which contains biomass; - reacting the biodegradable organic substance with the biomass in the bioreactor under essentially anaerobic conditions, whereby methane is produced; - taking a first flow of fluid from the bioreactor and using the first flow for a feed to a membrane filtration unit (filter feed), in which said feed is subjected to filtration, thereby forming a permeate stream and a retentate stream; - returning the retentate stream completely or partly to the bioreactor; - taking a second flow of fluid from the bioreactor as feed to a sludge treatment unit, which sludge treatment unit may be positioned outside the bioreactor or integrated in the bioreactor, wherein a flocculation or coagulation additive is added to the second flow before feeding the second flow to the sludge treatment unit or wherein a flocculation or coagulation additive is added inside the sludge treatment unit, whereby organic substance in the flow flocculates or coagulates, in which sludge treatment unit the second flow of fluid is separated into a third flow (concentrated surplus sludge), having an increased organic substance content compared to the second flow, and a fourth flow (reject water), having a decreased organic substance content compared to the second flow; and - the method comprising - using the fourth flow completely or partly for the feed of the membrane filtration unit, typically after mixing the fourth flow completely or the part thereof that is to be fed to the membrane filtration unit with the first flow that is to be fed to the membrane filtration unit; or - feeding the fourth flow completely or partly to the bioreactor. - feeding the aqueous waste stream into a bioreactor containing a fluid which contains biomass; - reacting the biodegradable organic substance with the biomass in the bioreactor under essentially anaerobic conditions, whereby methane is produced; - taking a first flow of fluid from the bioreactor and using the first flow for a feed to a membrane filtration unit (filter feed), in which said feed is subjected to filtration, thereby forming a permeate stream and a retentate stream; - returning the retentate stream completely or partly to the bioreactor; - taking a second flow of fluid from the bioreactor as feed to a sludge treatment unit, which sludge treatment unit may be positioned outside the bioreactor or integrated in the bioreactor, wherein a flocculation or coagulation additive is added to the second flow before feeding the second flow to the sludge treatment unit or wherein a flocculation or coagulation additive is added inside the sludge treatment unit, whereby organic substance in the flow flocculates or coagulates, in which sludge treatment unit the second flow of fluid is separated into a third flow (concentrated surplus sludge), having an increased organic substance content compared to the second flow, and a fourth flow (reject water), having a decreased organic substance content compared to the second flow; and - the method comprising - using the fourth flow completely or partly for the feed of the membrane filtration unit, typically after mixing the fourth flow completely or the part thereof that is to be fed to the membrane filtration unit with the first flow that is to be fed to the membrane filtration unit; or - feeding the fourth flow completely or partly to the bioreactor.