Updated

A U.S. judge on Monday ordered federal protections restored for grizzly bears in the Northern Rocky Mountains, a move that blocks the first hunts planned for the animals in the Lower 48 states in almost three decades.

The order came as Wyoming and Idaho were on the cusp of allowing up to 23 bears to be killed by hunters. U.S. District Judge Dana Christensen had twice delayed the hunts, and his latest order blocking them was due to expire later this week.

Christensen ruled that the case was "not about the ethics of hunting" but about whether federal officials adequately considered threats to the species' long-term recovery. In the judge's view, the answer was no.

Federal officials say the hunts would have been the first in the Lower 48 states since 1991.

The ruling marks a victory for wildlife advocates and Native American tribes that sued when the Interior Department last year revoked federal protections for more than 700 grizzly bears living in and around Yellowstone National Park.

Wildlife advocates argued that the animals face continued threats from climate change and loss of habitat.

Government biologists contend Yellowstone's grizzlies are thriving, have adapted to changes in their diet and are among the best-managed bears in the world.

The grizzlies living in Yellowstone were classified as a threatened species in 1975, when the population numbered just 136 animals after most bears were killed off early last century.

The U.S. Fish and Wildlife Service initially declared a successful recovery for the Yellowstone population in 2007, but a federal judge ordered protections to remain while wildlife officials studied whether the decline of a major food source — whitebark pine seeds — could threaten the bears' survival.

The federal agency concluded last year it had addressed that and all other threats and said the grizzlies were no longer a threatened species requiring restrictive federal protections for them and their habitat.

That decision turned management of the bears over to the states, which agreed on a plan that set hunting quotas based on the number of deaths each year to ensure the population stays above 600 animals.

The Fish and Wildlife Service has been moving toward lifting federal protections for another group of about 1,000 bears living in Montana's Glacier National Park and the Bob Marshall Wilderness, but it first wanted to see how Christensen ruled on the Yellowstone case.