The Center for Biological Diversity filed a lawsuit Thursday against the Washington Department of Fish and Wildlife, demanding a stop to annual spring bear hunts on commercial timberland.

The lawsuit follows a two-year KING 5 investigation into the Bear Depredation Management Program, a state run program that permits timber farmers to contract with hunters to kill bears that peel trees.

Bears are often hungry after hibernation, and when they wake up near large tree farms, the syrup under the bark offers a quick and sugary snack. When bears peel trees, however, they can damage or even kill them. Foresters blame bears for millions of dollars in lost revenue every year.

The hunters who kill the bears are allowed to employ two practices outlawed by voters in the 1990s: Using hounds and bait. Both were deemed cruel and unethical by voters in nearly all legislative districts across the state.

RELATED: Bear feeding program criticized for baiting

KING 5 found a loophole in the law, though. If a bear is causing problems, agents of the state are allowed to continue using bait and dogs, but they must target an animal known to be causing damage. The loophole does not allow for an indiscriminate thinning of bears in tree stands in order to reduce the potential for problems. In KING 5's investigation, hundreds of documents revealed the state is allowing hunters to do exactly that, often giving kill permits to foresters as a prevention tool.

"If we were to apply the same types of evidentiary proof to people that we're looking at for bears, in essence what you would say is, a crime was committed in this neighborhood, just round up all the people you see in that area," said CBD Programs Directory Peter Galvin. "We would look at that and stay, that's outrageous. You can't just simply start rounding up people who may or may not be responsible for what you're concerned about. This is what they're doing for bears."

The lawsuit demands that no more kill permits be issued until the program comes in line with state law.

WATCH: Center for Biological Diversity on bear hunt lawsuit

"WDFW has kept the Program out of public view because it knows that it would be deeply unpopular. Not only does the Program use hunting methods that Washington voters have voted to criminalize, but a poll commissioned by WDFW in 2014 indicates that Washington citizens overwhelmingly oppose the killing of black bears by any means to prevent damage to timber on commercial timberlands, with 70% of voters opposing such killing, and only 17% in favor," the lawsuit reads.

WDFW declined a request for comment.

The kill permits allow for the take of two bears, even if only one tree has damage. For many years, foresters could kill bears based on damage from the previous year. Those were called "historical damage permits" and allowed the killing of two bears even if no new damage occurred. Those stopped after KING's investigation, and WDFW admitted the practice could make it vulnerable to a lawsuit.

WDFW Game Division Manager Anis Aoude said in 2016 that there is no way to know which bear is causing damage and thereby impossible to target them. He stood by the program, calling it consistent with the voter initiative bans. The program got a new manager last year, Dan Brinson, who has taken a more critical approach, planning to develop a stakeholder group like the one formed for wolves. That group has been plagued with delays though and has yet to materialize.

"People have raised concerns about this for quite a few years. They've had a lot of time to try to come up with solutions. Frankly, we think they only reason they've accelerated their rhetoric to find a solution is because they know this lawsuit is coming," Galvin said.

RELATED: Accused bear poacher breaks silence, points finger at WDFW

Critics believe the state has created a secret hunting club with rule changes whenever political or economic whim demands it, often bowing to pressure from special interest groups over following the law.

RELATED: Timber farm bear hunts 'illegal,' Humane Society says

"In addition to the 2016 Guidance, WDFW has continually made substantive changes to the Program though more informal means, such as by adjusting the language of the Permits and application materials, or changing the rules for enforcement, often without notice to its own staff. In at least one circumstance, WDFW staff admitted that the agency left the language of the Permits deliberately ambiguous, so that it could have the freedom to change its mind later about what the policy meant," the lawsuit reads. "The result has been a chaotic program over which WDFW staff has repeatedly raised serious concerns, including concerns regarding its legality and lack of meaningful standards."

Galvin believes the state needs to start working with timberland owners to develop forestry methods that promote more of the bear's natural diet within monoculture tree stands.

"We were appalled to find out that the state Department of Fish and Wildlife has continued to use these practices under the loophole of depredation. In reality what's occurred is that they've institutionalized a bear hunting program under another name," Galvin said. "They've taken what was a small exemption in the voter initiative and driven a Mack truck through it."