The REPowerEU plan establishes the production objective of 35 billion m3 of biomethane in the European Union (EU) by 2030. Biomethane is an excellent energy vector to promote the defossilization of different sectors within a Power-to-Gas approach. The present study evaluates the economic and environmental implications of producing biomethane from the biogas generated in a municipal wastewater treatment plant (WWTP) with a treatment capacity of 100,000 m3/d and 500,000 population equivalents. The techno-economic analysis (TEA) and life cycle assessment (LCA) were conducted for a biomethane production plant based on biological methanation process using the hydrogen produced in a water electrolyser. The TEA illustrated that the electricity price (0–0.20 €/kWh) features an important impact on the biomethane cost (0.05–0.23 €/kWhHHV) due to the high electrolyser energy consumption. Flexible operation of the electrolyser is economically feasible at load factors above 35 %, which can be attributed to the lower impact of the electrolyser capital cost as the load factor increases. The LCA illustrated that biomethane has a lower global warming impact (<0.28 kg CO2-eq/kWhHHV) than fossil natural gas when the renewable electricity production in the mix is above 62 %. The results highlighted that high carbon prices under the EU Emission Trading System is an important driver to promote biomethane production in European countries since energy production from biomethane could be exempted to acquire emission allowances. This would provide a competitive advantage of biomethane over natural gas when considering the whole supply chain of the energy carrier. Overall, this study demonstrates that biological methanation has the potential to become an important biomethane production technology for future defossilization scenarios.