HELENA, Mont. — Yellowstone-area grizzly bears, scheduled to be hunted this month for the first time in decades, were granted a reprieve by a federal judge who ordered the animal restored to full protections under the Endangered Species Act.

United States District Judge Dana Christensen ruled in favor of the Crow Indian Tribe and other tribes and environmental groups who had argued that the Fish and Wildlife Service had erred in removing the bear’s threatened status in June 2017.

The agency, beginning with a proposal to take the bears off the list during the Obama administration, had failed to consider how the de-listing would affect other populations of protected grizzlies in the region, according to the judge’s decision. He also said the agency’s analysis of threats to the animal was “arbitrary and capricious,” according to the judge’s decision.

The case, the judge wrote, “is not about the ethics of hunting, and it is not about solving human- or livestock-grizzly conflicts as a practical or philosophical matter.”