The state of Oregon will finance most of the cost of removing four Klamath River dams to help salmon under a bill signed Tuesday by Gov. Ted Kulongoski.

GRANTS PASS — The state of Oregon will finance most of the cost of removing four Klamath River dams to help salmon under a bill signed Tuesday by Gov. Ted Kulongoski.

Meanwhile, federal officials met in Klamath Falls with representatives of Pacificorp and the states of California and Oregon. The parties must have a binding agreement by September to restore 300 miles of spawning habitat on what was once the third biggest salmon producer on the West Coast.

A preliminary agreement that serves as a framework for the negotiations both guarantees and limits the amount of irrigation water that will be available to farmers in the Klamath Basin, and offers hundreds of millions of dollars for salmon restoration work and research.

In recent decades, the needs of farms and fish in the area have been pitted against each other while declining salmon runs have triggered cutbacks in commercial and recreational fishing.

"Signing this bill into law is a critical step in ensuring that all of the Klamath's diverse rural communities have an economically viable future," Kulongoski said in a release. "Every farmer and fisherman whose livelihood depends on a healthy river system will benefit from the restoration of the Klamath Basin."

Long an opponent of dam removal, PacifiCorp shifted after it became clear the idea had strong public support and the utility could end up paying far more to continue trying to relicense the aged dams.

"We said all along if public policy dictates dam removal, we need to do everything we can to provide our customers with legal and financial protection," Pacificorp spokesman Art Sasse said.

Sasse, as well as representatives of Indian tribes, farmers, and salmon fishermen, who have long battled over balancing scarce water in the Klamath Basin between fish and farms, all praised the governor for his work to make dam removal a reality.

Oregon Wild, however, continues to oppose the deal. The conservation group argues that it gives too much to farmers and too little to fish and wildlife.

Water wars have long simmered in the Klamath Basin, where the first of the dams and a federal irrigation project built in the early 20th century turned the natural water distribution upside down, draining marshes and lakes and tapping rivers for electricity to put water on dry farmland that grows potatoes, horseradish, grain, alfalfa and cattle.

A drought in 2001 forced a shut-off of irrigation water to sustain threatened and endangered fish, and when the irrigation was restored the next year, tens of thousands of salmon died trying to spawn in the Klamath River, which was too low and too warm to sustain them.

Besides blocking salmon from the upper basin, the dams raise water temperatures to levels unhealthy for fish. Their reservoirs produce toxic algae. The fish are beset by parasites.

The law calls for building up a trust fund of $180 million over the next 10 years through a surcharge on PacifiCorp costumers in Oregon, which amounts to about $1.50 a month for a residential customer. California pays $20 million. If dam removal falls through, the money goes back to ratepayers.

If a federal feasibility study shows the dams can be safely torn down, work begins around 2020.