This abandoned railway line was originally the San Francisco bay area's connection to the Transcontinental Railroad constructed in the 1860s. The decline in San Francisco's status as a port with the advent of containerization, combined with the movement of produce traffic to the highways left this line with little business. Southern Pacific abandoned the line in 1984, and deeded the land to Alameda County. SP opted to use trackage rights on the newer and less steep Union Pacific (ex-WP) line, which ran parallel to SP's route.
The Pacific Locomotive Association leased the right-of-way from the county and began working to reconstruct the track in 1987. The Niles Canyon Railway ran its first passenger train in 1988. Passenger trains once again connected Sunol and Niles starting in 2006. The organization continues its work to extend and maintain the track along the line, restore its collection of railroad equipment, and operate historic demonstration trains for the benefit of the public. They plan to eventually extend their demonstration train service to Pleasanton, California.
Between Pleasonton and Livermore to the east, the line is slowly being built over. UP re-aligned their track to a section of the SP right-of-way east of Livermore, and there is also a section of SP right-of-way still used by UP to serve industrial customers. At Altamont Pass, the ROW serves as a service road for utility companies.
On the eastern end of the line, the San Joaquin Valley Railroad Museum is planning to rehabilitate the line from downtown Tracy out to the end of the rails above Tracy, a distance of about five miles, and offer weekend excursion trips.