The largest dam removal project in U.S. history was completed Wednesday, marking a major victory for tribes in the region who fought for decades to free hundreds of miles of the Klamath River near the California-Oregon border.

Through protests, testimony and lawsuits, local tribes showcased the environmental devastation due to the four towering hydroelectric dams, especially to salmon, which are are culturally and spiritually significant to tribes in the region. The dams cut salmon off from their historic habitat and caused them to die in alarming numbers because of bad water-quality conditions. Without the tribes’ work “to point out the damage that these dams were doing, not only to the environment, but to the social and cultural fabric of these tribal nations, there would be no dam removal,” said Mark Bransom, chief executive of the Klamath River Renewal Corporation, the nonprofit entity created to oversee the project.

Power company PacifiCorp built to generate electricity between 1918 and 1962. But the structures halted the natural flow of the waterway that was once known as the third-largest salmon-producing river on the West Coast. They disrupted the lifecycle of the region’s salmon, which spend most of their life in the Pacific Ocean but return to the chilly mountain streams to lay eggs.

At the same time, the dams only produced a fraction of PacifiCorp’s energy at full capacity — enough to power about 70,000 homes. They also didn’t provide irrigation, drin.