A federal appeals court has overturned a U.S. District Court’s dismissal of a lawsuit by environmental groups challenging a federal agency’s killing of wolves in Idaho.

A 9th U.S. Circuit Court of Appeals panel on Tuesday ruled that U.S. District Court Judge Edward Lodge erred in January 2018 when he ruled in favor of the U.S. Department of Agriculture’s Wildlife Services.

Specifically, the appeals panel ruled that the environmental groups have standing to bring the lawsuit, and sent the case back to the district court.

The environmental groups contend Wildlife Services’ 2011 study allowing it to kill wolves in the state is flawed because it relies on outdated information. The groups say the Agriculture Department is violating environmental laws by killing wolves without a new environmental analysis.

“With the new decision, we can return to the heart of the matter: whether or not Wildlife Services adequately reviewed the ecological consequences of killing scores of wolves each year in Idaho,” Talasi Brooks, an attorney with Western Watersheds Project, said in a statement.

The U.S Justice Department, which defends federal agencies in lawsuits, didn’t immediately respond to an inquiry from The Associated Press on Wednesday.

Lodge in his ruling said that even if Wildlife Services stopped killing wolves in Idaho, it wouldn’t matter because the Idaho Department of Fish and Game manages wolves in the state and has demonstrated it can kill wolves, hire third parties to kill wolves, or increase hunting and trapping for wolves. He said that meant the environmental groups lacked standing to bring the lawsuit.

The appeals court panel rejected that ruling. The court concluded that it’s possible if not likely that not as many wolves would be killed in Idaho if Wildlife Services stopped killing wolves because the Idaho Department of Fish and Game hadn’t demonstrated significant ability in that area.

“Indeed, the fact that Wildlife Services has carried out nearly all lethal wolf management in Idaho since 2011, partially through highly technical operations such as aerial hunting, suggests that IDFG may lack the expertise and resources to carry out those operations itself,” the appeals court wrote.

Fish and Game officials on Wednesday disputed that statement.

“Idaho Fish and Game has the capacity and expertise for wolf management, including conducting wolf control using agency employees, or other qualified contractors, to meet management objectives,” the agency said in an email to the AP

The Agriculture Department has said that in the 2018 federal fiscal year, which runs from the beginning of October to the end of September, Wildlife Services killed 83 wolves in Idaho. Of those, 73 involved livestock attacks and 10 were an effort to boost elk numbers in northern Idaho.

Besides wolf control actions, hunters and trappers also kill wolves. Fish and Game said that in 2018, hunters killed 179 wolves and trappers harvested another 133.

And in March, Fish and Game said seven wolves were killed in northern Idaho to boost elk numbers. The state agency hired a Montana-based contractor to kill the wolves.

In related action, Idaho lawmakers earlier this year approved maintaining a Wolf Depredation Control Board that receives money from the livestock industry that’s matched by Fish and Game. The board pays Wildlife Services to kill wolves that attack livestock and elk.