Every summer and fall, an extended family of killer whales splashes in the waters of Washington’s Puget Sound. But for years, the orcas’ numbers have been falling—and, reports Phuong Le for the Associated Press, scientists may finally know why. It looks like lack of food is driving lost pregnancies, two thirds of which are now thought to fail.

Related Content Pacific Northwest Orca Population Hits 30-Year-Low

Orcas are divided up into subpopulations based on their habitat, and in 2005 the distinct Southern Resident community, which lives in the northwestern part of the Pacific Ocean, was declared endangered under the Endangered Species Act. As of late 2016, the population had not grown in five years, and only 78 are thought to exist. But the reason why the population was struggling has long plagued researchers. ​Theories ranged from bothersome boats to toxins in the ocean. Now, a new study in the journal PLOS One suggests food scarcity is to blame.

Over six years, researchers used the killer whales’ feces to sniff out the truth. The orca poop contains hormones that let the scientists study not just their feeding habits, but their pregnancies. Along with photo identification of the creatures, they determined that up to 69 percent of all of the detected pregnancies weren’t carried to term. Thirty-three percent of the detected pregnancies failed late in gestation, or the calves died immediately after birth. Poor nutrition seems to have fueled the lost pregnancies, but it’s not clear how many were lost due to semi-starvation or the release of toxins, which are stored in the fat of killer whales but released when fat is broken down due to starvation.

What is clear is that the food Southern Residents depend on is threatened, too. The orcas live on a diet of salmon, many of which are endangered themselves. Everything from habitat loss to pollution to invasive species can hurt salmon, and the scarcity that results seems to be affecting killer whales’ ability to reproduce. A wildlife veterinarian not affiliated with the study tells Le that other factors like noise made by passing vessels should not be discounted, either.

The researchers also suggest a path forward. Conservationists should focus on recovery of salmon runs in the Fraser and Columbia Rivers, they say. “Without steps taken to remedy the situation,” they write, “we risk losing the endangered SRKW, an extraordinarily important and iconic species to the Pacific Northwest.” It’s a dire prediction—but if salmon populations can be recovered, perhaps the Southern Resident killer whales can manage to survive, too.