If you buy eco-friendly fish at the supermarket, you could be doing your body a favor. According to a new study, unsustainably harvested seafood also tends to pose more health risks.

Today’s consumers are awash in information about what kind of seafood to buy. Many educational campaigns offer recommendations for sustainable fish, and some also score species on their health effects. Fish contaminated with mercury can be harmful, for example, while fish with high omega-3 fatty-acid levels can help stave off heart disease.

But how should people balance environmental and health concerns when planning dinner? “Consumers are getting mixed health messages about how much fish to eat,” the authors note in Frontiers in Ecology and the Environment. And many people may wonder whether they should cut out fish altogether for the sake of the environment.

To sort through this conflicting information, the researchers evaluated 44 seafood species for three factors: health risk, health benefit, and sustainability. The team found that unsustainably harvested species were more likely to have higher mercury levels but did not have more omega-3 fatty acids. That makes sense, since large fish that live a long time or sit high on the food chain are more likely to accumulate mercury—and also tend to be overfished.

In contrast, species such as Atlantic mackerel, Pacific herring, and European anchovy scored well on both sustainability and health. The link between being green and being healthy wasn’t universal; blue rockfish, for example, is unsustainable and doesn’t contain much mercury. But overall, the study suggests that “human health and ecological sustainability go hand in hand,” the team concludes.