The U.S. House approved a bill Wednesday that would circumvent a federal judge’s order for dams on the lower Snake River to spill more water and protect current dam operations through the next four years.

The additional spilled water is meant to help migrating salmon, meaning it would not be available for generating electricity.

H.R. 3144 aims to keep dams in place and prevent any changes in operation until 2022. It’s sponsored by Washington Republican Reps. Cathy McMorris Rodgers and Dan Newhouse.

McMorris Rodgers said the bill would end decades of debating and studying the issue and instead select a path.

“We have made some tremendous investment and research in improving the fish runs. We need the certainty,” she said.

The bill comes after U.S. District Court Judge Michael Simon called in 2017 for the increase spilled water. Simon also asked dam managers to thoroughly consider removing or altering the four dams in southeast Washington.

“Despite billions of dollars spent on these efforts, the listed species continue to be in a perilous state,” Simon wrote. “The (Federal Columbia River Power System) remains a system that ‘cries out’ for a new approach.”

The bill protecting dam operations passed passed the House 225–189 and drew praise from both Republicans and Democrats.

“Scientific experts steeped in fish recovery and clean renewable energy will be able to do their job based on good science rather than an ideological crusade to eliminate dams on the river system resulting in the loss of our region’s best carbon-free energy asset,” said Rep. Kurt Schrader, an Oregon Democrat who voted for the bill.

Critics of the legislation say politicians are attempting to override a judge’s order simply because they don’t like the outcome.

“Basically they’re replacing law and science with a political process. One they are more comfortable with and they control,” said Joseph Bogaard is with the Save Our Wild Salmon Coalition.

McMorris Rodgers and Newhouse said the decision for the dam management should not belong to a judge but to the scientists who manage and know the dams best.

The fate of the bill — and potentially the dams — now rests with the Senate.