PORTLAND, Ore. — A federal judge in Oregon says a massive habitat restoration effort doesn’t do enough to improve Northwest salmon runs.

U.S. District Judge Michael H. Simon in Portland on Wednesday rejected the federal government’s plan for offsetting the damage that dams in the Columbia River Basin pose to the fish. He found that for the past 20 years, U.S. agencies have focused on trying to revive the salmon runs without hurting the generation of electricity.

He says those efforts “have already cost billions of dollars, yet they are failing.”

The ruling gives a major victory to conservationists and fishing businesses who hope to see four dams on the Snake River, a major tributary of the Columbia, breached to make way for the salmon. The state of Oregon and the Nez Perce Tribe were also among those who sued.