NOVELTY - Production of biofuel or bioenergy product from municipal, industrial, and/or farm sewage sludge comprises leaching metals from the sludge through the action of acid-producing, sulfur-oxidizing microorganisms, to produce a treated sludge; and synthesizing biofuel or bioenergy product(s) from the treated sludge by microbial action.    USE - The method is for producing biofuel or bioenergy product i.e. methane, hydrogen, methanol, ethanol, butanol, and/or biodiesel from municipal, industrial, and/or farm sewage sludge. The biofuel or bioenergy product is alcohol. The sludge is recalcitrant sludge left from anaerobic and/or aerobic digestion of raw sludge, where recalcitrant sludge has undergone composting, drying, dewatering, thickening, pressing, filtering, centrifugation, UV or chemical disinfection, lime stabilization, and/or thermal processing; farm sludge comprising animal manure; or industrial sludge containing polychlorinated biphenyl, polycyclic aromatic hydrocarbon, dioxin, pesticide, endocrine disrupter, antibiotic, tannin, lignin, resin, terpene, chlorophenolic compound, alkyl-sulfonate, alkylphenol, oil, grease, heavy metals, ammonia, and/or aliphatic or aromatic hydrocarbon. It is recalcitrant sludge contaminated with high levels of lead and/or cadmium. The farm sludge is farmyard manure or farm slurry. It comprises waste from swine, horse, cattle, sheep, and/or poultry. The farm sludge comprises pig waste (all claimed). The sludge is generated by industrial activities. It is an end product of wastewater treatment plant of industrial facility, such as chemical, pharmaceutical, or paper production facility, or food processing facility.    ADVANTAGE - The method recovers valuable components of sewage sludge including recalcitrant sludge, to help satisfy energy needs, while simultaneously reducing the impact of such waste on the environment and health of the population. The hazardous disposal including incineration or damping of excess sewage sludge, as well as improper use as fertilizer, are avoided, while producing valuable biofuels. The method is performed at an industrial scale.    DETAILED DESCRIPTION - An INDEPENDENT CLAIM is included for an integrated system for converting municipal, industrial, or farm sewage sludge to biofuel or bioenergy product(s) comprising a bioleaching system for extracting heavy metals from sludge, to prepare a treated sludge; an anaerobic bioreactor operably connected to receive the treated sludge; and optionally a photobioreactor operably connected to receive gas effluent from the anaerobic bioreactor.    DESCRIPTION OF DRAWING(S) - The drawing is a flow diagram illustrating the method and system for producing biofuel or bioenergy product from municipal, industrial, and/or farm sewage sludge.