National Grid is beginning the design and construction phase of a purification system to convert biogas from New York City’s Newtown Creek Wastewater Treatment Plant into renewable natural gas for residential and commercial use.

That phase of the project moves forward National Grid’s partnership with New York’s Department of Environmental Protection (DEP) to develop one of the first projects in the United States that would directly inject renewable gas into a local distribution system, the company said Thursday.

The project will use an existing waste stream at the city’s largest wastewater treatment plant to produce a reliable source of clean energy, improve air quality and help tackle climate change, National Grid said. Mayor Bill de Blasio recently announced the city’s commitment to an 80% reduction in greenhouse gas emissions by 2050.

“Collecting and treating the more than one billion gallons of wastewater produced in New York City every day is essential to public health and the protection of the environment, but it also requires a lot of energy,” said DEP Commissioner Emily Lloyd. “This partnership with National Grid will harness a byproduct of the wastewater treatment process to provide renewable natural gas to local residents while helping to reduce our carbon footprint and clean the air we all breathe.”

DEP currently reuses about 40% of the biogas produced at the Newtown Creek Wastewater Treatment Plant; the goal of the project is to boost that figure to 100%.

The project has the potential to produce enough energy to heat approximately 5,200 homes and reduce greenhouse gas emissions by more than 90,000 metric tons annually, the company said.