 The Yosemite Valley Railroad , originally established with the discovery of mineral deposits in Yosemite Valley and Merced Canyon , continued functioning through the early 20th century carrying tourists to Yosemite Valley along the Merced River . El Portal Road , constructed through Merced Canyon in 1926 , put an end to passenger service on the railway , but operations continued until the mid @-@ 1940s , when major flooding occurred , destroying sections of the railroad . In the early 20th century , when the upper Merced River basin lay mostly protected , the lower river was the subject of dam @-@ building and irrigation diversions by the Merced Irrigation District . The District proposed the Exchequer Dam , completed in the mid @-@ 1920s and raised in the 1960s , as a water storage facility on the Merced River . 
