Two years after the U.S. Fish and Wildlife Service stripped gray wolves of Endangered Species Act protections in Wyoming, the U.S. District Court in Washington, DC, has reinstated their status. Judge Amy Berman Jackson ruled on Tuesday that the management plan in Wyoming was inadequate and largely unenforceable.

Since the Obama administration delisted the gray wolf in 2012, the Fish and Wildlife Service treated it as a trophy/game animal in parts of Wyoming with allotted hunting seasons. Alternately, in four-fifths of the state, the wolf was treated as a predator that could be shot at any time.

“The court found that the agency acted arbitrarily and capriciously by relying upon improper factors,” Judge Jackson wrote in her ruling.

Since 2012, conservation groups have criticized the delisting of wolves in the state, fearing it would leave their fate to the whims of Wyoming’s ranchers and livestock farmers.

“Any state that has a wolf-management plan that allows for unlimited wolf killing throughout most of the state should not be allowed to manage wolves,” Defenders of Wildlife president and CEO Jamie Rappaport Clark said in a statement to the Center for Biological Diversity.

“The decision makes clear that ‘shoot on sight’ is not an acceptable management plan for wolves across the majority of the state,” added Sylvia Fallon, senior scientist and wildlife conservation director at the Natural Resources Defense Council. “It’s time for Wyoming to step back and develop a more science-based approach to managing wolves.”

In 2013, the wildlife service proposed removing federal protections from gray wolves across the contiguous United States, leaving management of the species to state agencies. Conservationists decried the idea. “Where management has been transferred to the states, America’s wolves have fallen under an assault of legislation, bullets, and traps,” wrote the founders of Living with Wolves in a June 2013 op-ed in the New York Times. “Have we brought wolves back for the sole purpose of hunting them down?”