A federal appeals court Tuesday retained federal protection for gray wolves in the western Great Lakes region, ruling that the government made crucial errors when it dropped them from the endangered species list five years ago.

The court upheld a district judge who overruled the US Fish and Wildlife Service, which had determined that wolves in Michigan, Minnesota, and Wisconsin had recovered after being shot, trapped, and poisoned nearly out of existence in the previous century. They've bounced back and now total about 3,800.

Even so, courts have sided with environmental groups led by the Humane Society of the United States, which have sued to block the service's repeated efforts to strip wolves in the region of their protected status and put states in charge of them. The service made its latest attempt in 2011. US Judge Beryl A. Howell struck down the plan three years later.

In a 3 to 0 ruling Tuesday, a panel of the US Court of Appeals for the District of Columbia Circuit said the service had not sufficiently considered important factors. They included how loss of historical territory would affect the predator's recovery and how removing the Great Lakes population segment from the endangered list would affect wolves in other parts of the nation.

As long as wolves are on the protected list, they cannot be killed unless human life is at risk. That means the three states cannot resume the hunting and trapping seasons they had when wolves were under their control.

A spokeswoman for the Fish and Wildlife Service had no immediate comment.

The same court took wolves in Wyoming off the endangered list in May.

Environmental advocates cheered the ruling on Great Lakes wolves, saying they remain vulnerable despite their comeback in recent decades.

"The second highest court in the nation reaffirmed that we must do much more to recover gray wolves before declaring the mission accomplished," said Noah Greenwald, endangered species program director at the Center for Biological Diversity. "Wolves are still missing from more than 90 percent of their historic range in the lower 48 states, and both the Endangered Species Act and common sense tell us we can't ignore that loss."

Organizations representing farmers and ranchers, who want authority to shoot wolves preying on livestock, have long pushed to drop them from the federal list, which hunting groups also favor.

"There's no question the wolf packs have recovered," said Zippy Duvall, president of the American Farm Bureau Federation. "We only wish we could say the same of farms and ranches within their reach."

Some members of Congress have tried repeatedly to attach provisions to various bills that would "delist" wolves, return management responsibilities to the states and bar further court challenges. The efforts succeeded with Northern Rockies wolves in 2011. But the latest attempt to do likewise with Great Lakes wolves fizzled in May when congressional negotiators dropped such a proposal from a spending measure.

Rep. Sean Duffy (R) of Wisconsin urged the Trump administration to appeal the court ruling.

"Our farmers deserve to be able to protect their livestock, and they should not suffer because of the decisions made by an overreaching federal government a thousand miles away," Representative Duffy said.

Humane Society President Wayne Pacelle said Congress and wildlife regulators should "recognize that wolves provide an enormous range of ecological and economic services to the regions where they live, and they do it for free."

The appeals court rejected the society's arguments that wolves are still threatened by humans and disease and that state management plans wouldn't safeguard them. But the judges said the process used by the Fish and Wildlife Service to remove protections from the wolves was fatally flawed.

By designating wolves in the three Great Lakes states and six others as a distinct population segment and dropping them from the endangered list without evaluating the effect on wolves elsewhere, the service created a "backdoor route" for lifting protections elsewhere, said the opinion written by Judge Patricia Millett.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

The service "cannot review a single segment with blinders on," Ms. Millett wrote.

This story was reported by The Associated Press.