The first stage of two-stage anaerobic digestion can thus be optimized as an anaerobic bioleaching process and produce a treated sludge (i.e., digestate) that meets the land-use standards in The Netherlands for copper,zinc, nickel and cadmium, but not for lead.