SACRAMENTO, Calif. (AP) – Endangered salmon blocked for nearly a century from hundreds of miles of the Klamath River in Oregon and California are expected to return en masse under unusual agreements signed Wednesday to tear down four hydroelectric dams.

U.S. Interior Secretary Sally Jewell, who signed agreements with the governors of both states, said the plan would bring about one of the largest river restoration projects in the history of the U.S.

The landmark deals also protect farmers and ranchers from rising power and water prices as the various interests work to end long-running water wars in the drought-stricken Klamath River basin.

The dams now block fish from migrating to their historic spawning grounds and also degrade water quality, spreading fish diseases and algae blooms. Salmon are sacred to some Native American tribes that use them for subsistence and ceremony.

“Our allocation of fish this year doesn’t meet half of our subsistence for our people,” said Yurok Tribe Vice Chairman David Gensaw. “This is a threat to our culture, our religion and the economic survival of our people.”

The Klamath basin has been the site of tense disputes between tribes, environmentalists, farmers and ranchers for nearly two decades.

In 2001, water deliveries to farmers and ranchers were severely curtailed. Adult salmon suffered a major die-off a year later. Salmon harvests have been sharply reduced for the tribes as well as recreational and commercial fishers.

The latest deal is spelled out in two agreements signed at the mouth of the river in Northern California in a ceremony attended by Oregon Gov. Kate Brown, California Gov. Jerry Brown, federal officials, tribal leaders, conservation groups, large-scale water users and dam-owner PacifiCorp.

“This is a huge exercise of humankind fixing some of the mistakes of the past,” Jerry Brown said.

The agreements include promises to keep working on a six-year-old settlement process that went dormant when Congress failed to approve it last year. In addition to removing dams, an initial settlement would have restored tribal lands and provided more water for farmers and ranchers.

By removing the dams without congressional approval and providing price assurances to farmers, backers hope to make the larger deal more palatable for Congress.

Funding for the $450 million project would come from PacifiCorp customers in California and Oregon, along with a water bond approved by California voters in 2014.

Not everyone is celebrating. Dam removal is a major improvement, but the guarantees for farmers and ranchers don’t belong in the agreement, said Jim McCarthy of the conservation group WaterWatch.

The PacifiCorp utility has supported a dam-removal agreement because it offers the company liability protections and caps the costs to its customers.

Several studies have shown that dam upgrades likely to be required would significantly reduce electricity generation and would cost millions of dollars more than dam removal and replacement of hydropower with other sources.

The company will transfer ownership of four Klamath River dams to a nonprofit corporation recently created in California, which will petition the Federal Energy Regulatory Commission for approval to tear them down beginning in 2020. Two others will be transferred to the U.S. Bureau of Reclamation, which will continue operating them without raising prices for farmers and ranchers who irrigate their fields.

One of the tribes already has obtained senior water rights through the courts, limiting water available for farmers and ranchers, and the others could pursue that process. Klamath Basin agriculture is valued at about $670 million annually.

Scott White, head of the Klamath Water Users Association, said the agricultural interests he represents had no stake in the dam removal but he hopes the efforts to boost water rights don’t get lost.

“The Klamath River is a precious resource,” White said. “There is much left to be done to preserve the interests of the communities that it serves.”

Klamath Tribes Chairman Don Gentry said the c’iyaal’s, which means salmon, were placed in the river by the creator and have been essential in sustaining the tribes.

“We won’t be whole, and we won’t be complete as a people until we can once again fish for our c’iyaal’s,” Gentry said.

Copyright 2016 The Associated Press.