This study presented a techno-economic evaluation of the thermal conversion of sludge and digestate integrated with anaerobic digestion (AD) as a means of waste volume reduction, carbon emissions mitigation and energy recovery in wastewater treatment plants. The study was supported by empirical data and thermodynamic modelling of processes involved in sludge conversion. A gasification plant (6 MWel) with combustion engines produced sufficient power for treating wastewater (1.6 Mp.e.) and 130 tpd dry sludge. The integration of AD with gasification increased total energy coverage by up to 46%. Treatment costs between (sic)132 and 210 dry t(-1) were achieved and the associated levelised costs of electricity (23-85c kWh(-1)) were within the cost range known for biomass digestion and other CHP technologies. Biomass and waste co-processing was evaluated in order to avoid heat and electricity deficits due to variations in sludge availability and properties, showing potential for reducing carbon footprint and associated electricity costs.