A U.S. District Court judge restored federal protections on Monday to about 700 grizzly bears living in and around Yellowstone National Park, canceling planned hunts in Wyoming and Idaho and overturning a Trump administration finding that the iconic population had recovered.

In a 48-page order, Judge Dana Christensen wrote that the case was "not about the ethics of hunting, and it is not about solving human- or livestock-grizzly conflicts." Instead, he said, the ruling was based on his determination that the U.S. Fish and Wildlife Service had illegally failed to consider how removing the Yellowstone bears from the endangered species list would affect other protected grizzly populations, and that its analysis of future threats to the bears was "arbitrary and capricious."

The decision sided with multiple conservation and tribal organizations that sued Fish and Wildlife after it delisted Yellowstone grizzlies in 2017, and it supported one of their primary contentions: that the isolation of the bear population, which is expanding outward but remains unconnected to the other major U.S. grizzly population near the Canada border, is genetically vulnerable.

"The Service appropriately recognized that the population's genetic health is a significant factor demanding consideration," Christensen wrote. "However, it misread the scientific studies it relied upon, failing to recognize that all evidence suggests that the long-term viability of the Greater Yellowstone grizzly is far less certain absent new genetic material."

In a statement, Fish and Wildlife said it was reviewing the ruling and noted that it means the bears' management — in the hands of Wyoming, Montana and Idaho since last year — now returns to the federal government.

Nevertheless, the agency said, "we stand behind our finding that the Greater Yellowstone Ecosystem grizzly bear is biologically recovered and no longer requires protection . . . Our determination was based on our rigorous interpretation of the law and is supported by the best available science and a comprehensive conservation strategy developed with our federal, state, and tribal partners."

Grizzlies in the Lower 48 were placed on the endangered species list in 1975, by which point the predators had been eradicated from 98 percent of their historic range and the Yellowstone-area population had dropped to fewer than 140 bears.

The federal government first delisted Yellowstone grizzlies in 2007, when their numbers had rebounded to well above 500. But that decision was also overturned in federal court, which found that the animals' survival was threatened by the loss of a key food source because of climate change. Last year, Fish and Wildlife said it had concluded that the dwindling availability of that food, whitebark pine seeds, did not pose a major threat to the population.

Monday’s ruling was a victory for an array of groups that sued to retain protections for grizzlies and argued that Wyoming’s hunt — which would have allowed the killing of up to 22 bears — would pile unnecessary deaths onto mortality levels that are increasing due to bear run-ins with hunters, ranchers and cars.

Supporters of the hunt, including the National Rifle Association and some ranching groups, argued that it was necessary to control the grizzly population and might remove "problem" bears. Federal scientists said a limited hunt would not harm the population.

“We’re glad the court sided with science instead of states bent on reducing the Yellowstone grizzly population and subjecting these beloved bears to a trophy hunt,” said Bonnie Rice, a senior representative with the Sierra Club, one of the organizations that sued. “Changing food sources, isolation, inadequate state management plans and other threats that grizzly bears continue to face warrant strong protections until they reach full recovery.”