Since the valley was within Yosemite National Park, an act of Congress was needed to authorize the project. The U.S. Congress passed and President Woodrow Wilson signed the Raker Act in 1913, which permitted the flooding of the valley under the conditions that power and water derived from the river could only be used for public interests. Ultimately, the city sold hydropower from the dam to the Pacific Gas and Electric Company (PG&E), which led to decades of legal wrangling and controversy.