Municipal wastewater sludge has been used for fertiliser and biogas production for several decades. Chemical compounds such as iron and aluminium are common coagulants used in wastewater treatment plants to remove suspended solids, phosphorus and micro-organisms. This laboratory study explores whether ferric chloride (FeCl3 as PIX-111) or aluminium chloride (AlCl3 as PAX-18) flocculation could stimulate biogas production in wastewater sludge contaminated with Microthrix parvicella. In a fermentation process run in three replicates, cumulative methane production was in average about 25 % higher using the iron flocculated sludge than using the aluminium flocculated sludge; this difference was statistically significant (P < 0.05) in the subsequent runs of the semi-continuous process. In all runs, the iron flocculated sludge produced less (P < 0.05) hydrogen sulphide in the biogas than the aluminium flocculated sludge. The numbers of M. parvicella stayed at the similar levels throughout the process. It is concluded that biogas production is higher and more stable with iron coagulant in comparison with aluminium coagulant, presumably due to the reduced formation of hydrogen sulphide. Thus, iron coagulants seem to be better than aluminium coagulants to stimulate the methane production process. Both coagulants significantly suppressed multiplication of M. parvicella in the biogas reactor, i.e. they did not evoke foaming in this experiment.