According to a new study published in Environmental Science Technology, hundreds of active hydropower plants are making a worse impact on the climate than fossil fuels.

Yup, you read that right: Hydropower, popularly seen as a green energy source — and a major clean energy source in a lot of emission-reduction plans — can release more greenhouse gases than coal- or oil-burning power plants, under certain conditions.

Scientists have known for a while now that hydropower facilities release greenhouse gases — mostly methane, but also CO2 and nitrous oxide. But the way they’ve historically calculated a facility’s climate impact has obscured methane’s heat-trapping potency. The new study, which looks at data from thousands of hydropower plants to compare their long- and short-term climate impacts, found that hundreds of active facilities around the world are worse for the climate than coal.

“It’s pretty alarming,” Ilissa Ocko, the study’s lead author, told Grist.

Setting up a hydropower facility means building a dam and creating a reservoir, often submerging plants and other organic matter in the process. Traditional calculations of hydropower’s environmental impact take this destruction into account. But as the drowned plants decompose, they release methane, which bubbles out of the reservoir and into the atmosphere. Ocko’s study was the first to take into account how these methane emissions change over time.

Exactly how much methane is released varies widely depending on a wide range of factors, from temperature to precipitation to the depth of the pool — methane production can vary from year to year and even season to season. Ocko’s team was able to identify a few indicators that a hydropower facility plant would likely produce more greenhouse gases than others, such as a large surface-area-to-depth ratio of the reservoir and warmer temperatures. But it’s a lot more complicated than that, and each facility’s exact emissions profile — and the causes of that emissions profile — all vary, widely.

None of this means that hydropower is “bad”: Some facilities have negative emissions, and some are more warming than fossil fuels in the short term but better in the long term (even as the opposite is also sometimes true).

Since hydropower still has the potential to be a low-emissions power source, the most important thing is for planners to choose locations and design facilities with emissions in mind, so that the plants either minimize greenhouse gas emissions or divert them before they enter the atmosphere.

This is going to be crucial for industry and policymakers alike in coming years as governments turn to hydropower to meet their sustainability goals. Hydropower electricity production is expected to grow by up to 70 percent by 2040, with 3,700 new facilities currently planned or under construction. New York City is a prime example — Mayor Bill de Blasio recently recommitted to a pipeline to bring hydroelectricity to the city from Canada. With this and similar plans, the devil is in the details.

“We need to be really careful that new facilities we develop don’t fall into the category that have emissions that lead to climate impacts that are worse than fossil fuels,” said Ocko.