Hundreds of homes in Bolton will be heated using sewage after a project was awarded government funding.
Almost 2,000 homes and businesses will be warmed by excess heat generated by the town's sewer, as well as from waste hot water from washing machines, bathrooms and kitchens.
The energy will fuel a new heat pump, as part of Bolton's first district heating network, which should help lower bills and greenhouse gases, the net zero and energy security department said.
Heat networks supply heating and hot water to buildings via heat pumps or sources from underground, manufacturing, and waste.
They help cut carbon emissions by providing heat to multiple buildings from a central source, rather than individual, energy-intensive heaters like gas boilers.
The Bolton project has won £11m from the government's Green Heat Network Fund, designed to develop greener, low-cost heating systems.
Three further projects also won a share of the £80.6m pot of money from the Green Heat Network Fund.
Lord Callanan, minister for energy efficiency and green finance, said the "innovative projects" will help lower bills and show "how energy sources can be found in the most unexpected places".
Setting up more heat networks is part of the government's plan to reduce the sector's climate impact, with heating in buildings making up 30% of all UK emissions.
Another project, the Hull East District Heat Network, won £22m from the fund to build a heat network using excess heat from a nearby chemicals park.
Green groups have also been calling on the government to lower energy demand from buildings by increasing insulation.
The Green Alliance thinktank welcomed the support for the new heat networks, which it said would lower emissions and bills.
Its political adviser Annabel Rice said: "With the energy crisis still in full force, innovation to roll out clean and affordable heating is crucial to keeping households and businesses afloat."
She added: "With estimates that around a fifth of heat will be distributed through heat networks by 2050 this is a crucial part of the puzzle for decarbonisation."
But she said rules must be in place to protect consumers from potential high prices, as heat networks are not covered by the energy price cap, so costs can fluctuate.