The Swedish pulp and paper industry is the third largest exporter of pulp and paper products worldwide. It is a highly energy-demanding and water-utilising industry, which generates large volumes of wastewater rich in organic material. These organic materials are to different extents suitable for anaerobic digestion (AD) and production of energy-rich biomethane. The implementation of an AD process within the wastewater treatment plant of a mill would increase the treatment capacity and decrease the overall energy consumption due to less aeration and lower sludge production and in addition produce biomethane. Despite the many benefits of AD it is only applied at two mills in Sweden today. The reason for the low implementation over the years may be due to problems encountered linked to the complexity and varying composition of the wastewaters. Due to changes in market demands many mills have broadened their product portfolios and turned towards more refined products. This has increased both the complexity and the variations of the wastewaters´ composition even further, as the above changes can imply an increased pulp bleaching and utilisation of more diverse raw materials within the mills.The main aim of this thesis was therefore to generate knowledge needed for an expansion of the biomethane production within the pulp and paper industry. As a first step to achieve this an evaluation of the biomethane potential and the suitability for AD of wastewaters within a range of Swedish pulp and paper mills was performed.Thus, around 70 wastewater streams from 11 different processes at eight mills were screened for their biomethane potential. In a second step, the impact of shifts in wood raw material and bleaching on the AD process and the biomethane production was investigated and further evaluated in upflow anaerobic sludge bed (UASB) reactors.ii The screening showed that the biomethane potential within the Swedish pulp and paper industry could be estimated to 700 GWh, which corresponds to 40% of the Swedish biomethane production during 2014. However, depending on the conditions at each specific mill the strategy for the establishment of AD needs to differ. For mills producing kraft pulp the potential is mainly found in wastewaters rich in fibres, alkaline kraft bleaching wastewaters and methanol-rich condensates. The biomethane potential within thermo-mechanical pulp-(TMP) and chemical thermo-mechanical pulp (CTMP) mills is mainly present in the total effluents after pre-sedimentation and in the bleaching effluents as these holds high concentrations of dissolved organic material. The screening further showed that the raw material used for pulp production is an important factor for the biomethane potential of a specific wastewater stream, i.e.hardwood (HW) wastewaters have higher potentials than those from softwood (SW) pulp production. This was confirmed in the lab-scale UASB reactor experiments, in which an alkaline kraft bleaching wastewater and a composite pulping and bleaching CTMP wastewater were used as s...