PORTLAND, Ore. – The government can move forward with its plan to slaughter barred owls as part of a study to see if their absence will help imperiled spotted owls, the Ninth Circuit ruled Wednesday.

The appeals court shrugged off claims from environmentalists that the Migratory Bird Treaty Act only allows the killing of protected birds to benefit the species killed.

Friends of Animals sued the U.S. Fish & Wildlife Service in 2014, advancing an argument that could have upended a contentious cornerstone of the government’s wildlife management strategy – killing droves of one wild animal to save another.

Barred owls, which are protected under the Migratory Bird Treaty Act, never lived in the Pacific Northwest until a changing climate and habitat destruction pushed them west. Owl species that are as closely related as the barred and spotted owls don’t usually share the same habitat. If they do, they have different hunting methods or diets. In the wake of barred owls’ rapid migration, the two species haven’t evolved to adopt the separate niches that would let them peacefully co-exist in the same forests.

Instead, they are battling for supremacy. And barred owls, which are more aggressive, reproduce more frequently and need less territory to thrive, seem to be winning.

But Friends of Animals claimed the Fish & Wildlife Service unfairly made barred owls a scapegoat for conditions that are largely caused by humans—just as it did by authorizing the killing of thousands of cormorants to prevent them from eating young salmon, and allowing the killing of ravens across the American West to keep them from eating protected sage grouse.

Friends of Animals filed a separate suit in June, accusing the service of doing little to protect spotted owls besides its experiment with killing barred owls. That complaint claims the service illegally issues permits to let logging companies harass or kill spotted owls. It also draws a connection between the decline of spotted owls due to competition from barred owls and the government’s economic interest in logging on state and federal land.

The Endangered Species Act allows the killing of a limited number of threatened spotted owls. And if barred owls account for the deaths of spotted owls up to that limit, the service will be hamstrung in its ability to let logging companies continue the “incidental killing” of spotted owls that their operations require.

The service justified its killing of barred owls as an experiment to see if reducing their number would benefit spotted owls.

U.S. District Judge Ann Aiken dismissed the complaint in 2015, finding the service’s experiment was legally allowed under a provision of the Migratory Bird Act that permits the killing of protected birds “for scientific use, for propagation or for museum use.”

Friends of Animals appealed to the Ninth Circuit, where a three-judge panel seemed interested in oral arguments advanced by Friends’ attorney, Michael Harris. Harris told the judges those exceptions must benefit the bird the service is considering killing. Harris said they did not apply in situations where the killing of one bird was intended to benefit another, whether by scientific, propagation or museum means.

Harris argued that the court’s ruling must address a new ecological reality.

“This is about the legal and ethical considerations when it comes to human involvement in species-on-species conflict,” Harris told the panel. “This isn’t a case in which barred owls were put in cages and brought to the Pacific Northwest and inadvertently or maliciously let loose. It’s about a species that, because of changing habitat conditions, migrated across the country over the course of decades and that now calls this area home as well.”

But the judges didn’t buy it.

While U.S. Circuit Judge Diarmuid F. O’Scannlain said there was “common-sense appeal” in the environmentalists’ argument, he wrote on behalf of the three-judge panel that the Migratory Bird Treaty Act neither states nor implies that there is a same-species limitation on the exceptions that allow protected birds to be killed.

“It would be odd to say colloquially that a bird was ‘employed for a scientific purpose’ when the purpose of taking the bird was to procure its demise and not affirmatively to experiment with the bird or its cadaver,” O’Scannlain wrote in the court’s 22-page opinion.

But the panel found that the main goal of the act is to prevent the overall “extermination” of a protected species, not to prohibit all killing of protected birds that does not directly benefit the bird being killed.

“It gives broad latitude to the parties to permit use of birds as they ‘may see fit,’ and it envisions the ‘utilization of the birds’ for a broad range of purposes— sport, food, commerce, and industry—which generally serve no benefit to the birds themselves,” the ruling states.

And the language of the act “clearly encompasses a controlled scientific study to save a threatened species covered by the Convention when that study will have only a negligible effect on the overall population of the taken species,” O’Scannlain wrote.

U.S. Circuit Judges Richard A. Paez and Carlos T. Bea also joined in the opinion.